Login | |
|
 |
RE: Adding Network Printer - 1/22/2008 1:44:20 AM
|
|
 |
|
| |
ebgreen
Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
|
Now we will need to see an example line or two from C:\printers.txt. Also, do you get the error right off the bat or does it create some of the queues first then error out?
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Adding Network Printer - 1/22/2008 2:42:38 AM
|
|
 |
|
| |
ebgreen
Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
|
Nope, dashes and underlines are fine. Make this change and see if the output makes sense: For Each strPrin in arrPrin WScript.Echo strPrin Set objNetwork = WScript.CreateObject("WScript.Network") objNetwork.AddWindowsPrinterConnection strPrin Next
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Adding Network Printer - 1/22/2008 3:34:02 AM
|
|
 |
|
| |
ebgreen
Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
|
Ok, change the echo to: WScript.Echo "|" & strPrin & "|" What we are trying to do is to make sure there isn't any white space in there. Next, copy everything between the |s in the echo. Then paste it into a run command. See if it opens the queue.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|