|
Thanks to all for suggestions. I pasted the path directly into the run line as Paul
suggested. This worked fine and brought up the printer immediately. I then made
the Chr(34) change as Rich suggested. When I did this, it told me the printer
name was wrong. If I add an echo as below, the result is 0. UNCpath1
= "\\server.abc.private\"
& Chr(34) & “HP Color LaserJet 3500" & Chr(34) Wscript.Echo UNCpath1 Hmmm. From: Rich Milburn [mailto:[EMAIL PROTECTED] Try using Chr(34) instead of quotes for your paths… i.e. UNCpath1
= "\\server.abc.private\"
& Chr(34) & “HP Color LaserJet 3500" & Chr(34) Chr(34)
is how you get quotes into a string – at least it’s the only way I’ve ever
gotten to work… my WSH doesn’t seem to like the double quotes I see some people
use sometimes (i.e. MsgBox “I
said, “”Hello.”” would always give me an error. MsgBox “I said, “ & chr(34)
& “Hello.” & Chr(34) works) Rich ----------------------------------------------------------------------- From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Noah Eiger Hi – I am
trying to modify a VBS found on the Internet to map multiple printers. This
will be run for every user in an OU. I keep getting the following error for
line 8: 8007007B - The filename, directory name or volume syntax is incorrect I
have played around with the syntax but think I am missing something very basic
here. Any thoughts? I got
this from:
http://www.computerperformance.co.uk/ezine/ezine16.htm#Example%203:%20Mapping%20Multiple%20Printers '
Poached from Guy Thomas February 2004. '
****************************** Dim
multiPrinter, UNCpath1, UNCpath2, UNCpath3 UNCpath1
= "\\server.abc.private\HP Color LaserJet 3500" UNCpath2
= "\\server.abc.private\HP LaserJet 3300" UNCpath2
= "\\server.abc.private\HP LaserJet 5000" Set
multiPrinter = CreateObject("WScript.Network") multiPrinter.AddWindowsPrinterConnection
UNCpath1 multiPrinter.AddWindowsPrinterConnection
UNCpath2 multiPrinter.AddWindowsPrinterConnection
UNCpath3 '
WScript.Echo "Your printer is mapped from : " &
UNCpath1 _ '
& "and from : " & UNCpath2 WScript.Quit ' End
of _vbscript_ -------APPLEBEE'S
INTERNATIONAL, INC. CONFIDENTIALITY NOTICE------- -- -- -- |
- RE: [ActiveDir] Help with VB script to map printers Noah Eiger
- RE: [ActiveDir] Help with VB script to map print... Cace, Andrew
- Re: [ActiveDir] Help with VB script to map print... Paul Wilkinson
- RE: [ActiveDir] Help with VB script to map print... Ken Schaefer
- RE: [ActiveDir] Help with VB script to map print... Active Directory
- RE: [ActiveDir] Help with VB script to map print... Rich Milburn
- RE: [ActiveDir] Help with VB script to map print... Ulf B. Simon-Weidner
