Login | |
|
 |
Set Printer script failure - 8/9/2006 1:28:49 AM
|
|
 |
|
| |
elrobobo
Posts: 2
Score: 0
Joined: 8/8/2006
Status: offline
|
Have a strange problem with a VBScript in some university computer labs that I administrate, and I don't know what's causing it. When machines boot up and run a printer setting script, I get the following Windows Script Host error (on some machines, more on that in a sec): Script: \. . . \setprinters.vbs Line: 59 Char: 2 Error: The printer driver is unknown Code: 80070705 Source: (null) The biggest part of the problem for me is that the error doesn't happen with all the machines. The computers in question are WindowsXP machines on a Samba domain. Our printing is done through Cups. We just installed a new model of printer in two of the labs (the only two that have the error), and set the drivers up to be shared from Samba (I am not sure how the admin who set up our last printers initially configured where the drivers were, since this was two admin generations back, before my time working in this office, and poorly documented.). Here is the important part: all of the labs are on the same Symantec Ghost created image. Machines are given a name based on their lab, and shortcuts, desktops, printers, etc are assigned in log on scripts based on the name. Also, while we do used a few different models, all of are hardware is Dell, and all of it is exactly the same within a given lab. What this means is the only things that are different machine to machine are name and things having to do with the network connection (unless I have missed something). However, after imaging an entire lab, and seemingly making all the machines essentially identical, some produce this error, and some of them work perfectly. The error is only consistant on the machines that produce it; i.e. computers labs23 and labs24 get the error every time they start up, while labs25 has worked every time. The logical thing (I thought) to expect to be the most likely source of the error was a problem with a particular set of IPs. However, even after swaping network cables and manually assigning different IPs (normally these use DHCP) which were assigned to machines that had been working, the problem remained. So, essentially, everything but the MAC address has been swapped, yielding no results. Beyond the networking settings, there shouldn't be any other differences machine to machine (except machine name, which never produced problems with this script before, or with any other part of our setup; I am going to play with this today though). I'll also say that this is the same error that was produced before we properly added the drivers to the Samba share for printer drivers, and at that point it happened on all the machines Here is the part of the script the error is coming from, and some context: Sub SetPrinter(ByVal PrinterPath) DIM WshNetwork Set WshNetwork = CreateObject("WScript.Network") WshNetwork.AddWindowsPrinterConnection(PrinterPath) '<-This part isn't actually in the script; it's just that this is line 59, the line the error message sites WshNetwork.SetDefaultPrinter Printerpath End sub I am not terribly skilled with VBScript, but I know this worked before, still works sometimes, and has no errors obvious to me. Anyone have any ideas?
|
|
| |
|
|
|
 |
RE: Set Printer script failure - 8/9/2006 1:53:45 AM
|
|
 |
|
| |
Snipah
Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
|
ElRobobo, What does the following var hold for info? quote:
PrinterPath
_____________________________
For more information, please see the "Read me First" topic. http://www.visualbasicscript.com
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|