BAHHH! now “” works for me too!  Must have been a Hotfix MS released recently hehe

 

-----------------------------------------------------------------------
Rich Milburn
MCSE, Microsoft MVP - Directory Services
Sr Network Analyst, Field Platform Development
Applebee's International, Inc.
4551 W. 107th St
Overland Park, KS 66207
913-967-2819
----------------------------------------------------------------------
”I love the smell of red herrings in the morning” - anonymous


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ed Crowley [MVP]
Sent: Wednesday, December 07, 2005 2:33 PM
To: [email protected]
Subject: RE: [ActiveDir] Help with _vbscript_ to map printers

 

Strange.  I've never had problems with double double-quotes in a _vbscript_.

 

Ed Crowley MCSE+Internet MVP
Freelance E-Mail Philosopher
Protecting the world from PSTs and Bricked Backups!™

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rich Milburn
Sent: Wednesday, December 07, 2005 12:17 PM
To: [email protected]
Subject: RE: [ActiveDir] Help with _vbscript_ to map printers

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

 

-----------------------------------------------------------------------
Rich Milburn
MCSE, Microsoft MVP - Directory Services
Sr Network Analyst, Field Platform Development
Applebee's International, Inc.
4551 W. 107th St
Overland Park, KS 66207
913-967-2819
----------------------------------------------------------------------
”I love the smell of red herrings in the morning” - anonymous


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Noah Eiger
Sent: Wednesday, December 07, 2005 1:10 PM
To: [email protected]
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_


-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED / CONFIDENTIAL INFORMATION may be contained in this message or any attachments. This information is strictly confidential and may be subject to attorney-client privilege. This message is intended only for the use of the named addressee. If you are not the intended recipient of this message, unauthorized forwarding, printing, copying, distribution, or using such information is strictly prohibited and may be unlawful. If you have received this in error, you should kindly notify the sender by reply e-mail and immediately destroy this message. Unauthorized interception of this e-mail is a violation of federal criminal law. Applebee's International, Inc. reserves the right to monitor and review the content of all messages sent to and from this e-mail address. Messages sent to or from this e-mail address may be stored on the Applebee's International, Inc. e-mail system.


 

--
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


-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED / CONFIDENTIAL INFORMATION may be contained in this message or any attachments. This information is strictly confidential and may be subject to attorney-client privilege. This message is intended only for the use of the named addressee. If you are not the intended recipient of this message, unauthorized forwarding, printing, copying, distribution, or using such information is strictly prohibited and may be unlawful. If you have received this in error, you should kindly notify the sender by reply e-mail and immediately destroy this message. Unauthorized interception of this e-mail is a violation of federal criminal law. Applebee's International, Inc. reserves the right to monitor and review the content of all messages sent to and from this e-mail address. Messages sent to or from this e-mail address may be stored on the Applebee's International, Inc. e-mail system.


Reply via email to