Quite.  And, when I change the script for a server\printer on my network, it works.  The only difference is that I don't have any printer shares with spaces.  Not sure if it would be a big deal.

 

Along with what Rich said, if you write scripts in Word, opposed to Notepad, the " character is not translated correctly.  Word may use the 66 99 looking ones, depending on your font, I guess. 

 

If you haven't, try to copy it to Notepad and edit it there.  May also try creating a test printer share with no spaces, see if that helps.

 

Thanks,
JD

Northrop Grumman
 Information Technology

  Commercial, State & Local Solutions

512-377-2222x235
Alphapage 866-521-6091
E-Page [EMAIL PROTECTED]


From: AD [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 07, 2005 1:37 PM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] Help with _vbscript_ to map printers

 

Actually both are valid.

 


From: WILLIAMS, J.D.
Sent: Wed 07/12/2005 2:31 PM
To: 'ActiveDir@mail.activedir.org'
Cc: '[EMAIL PROTECTED]'
Subject: RE: [ActiveDir] Help with _vbscript_ to map printers

My wsh book shows the command to be

.AddPrinterConnection not .AddWindowsPrinterConnection

 

HTH

 

Thanks,
JD

Northrop Grumman
 Information Technology

  Commercial, State & Local Solutions

512-377-2222x235
Alphapage 866-521-6091
E-Page [EMAIL PROTECTED]


From: Noah Eiger [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 07, 2005 1:10 PM
To: ActiveDir@mail.activedir.org
Subject: [ActiveDir] Help with _vbscript_ to map printers

 

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_

 

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.13.12/194 - Release Date: 12/7/2005

Reply via email to