|
-
Jul 9th, 2009, 07:18 PM
#1
Thread Starter
New Member
8007007B error Mapping Network printer
Okay
I am mapping multiple printers with up to 2 drivers each (PCL & PS) with a logon script. There is a print server which is queried for it shared printers and then that list is iterated through and mapped. Some of them are mapped but one of them does not. Why would one not map and the others map?
the offending printer is called "Reception" on the print server
this is the line that creates the UNC that is passed to the network object. Is it wrong some how?
strUNCPrinter = "\\" & objPrinter.SystemName & "\" & objPrinter.ShareName
the wscript.echo line outputs this (with out quotes) "printer up next \\ABOR1\Reception"
Is that not the right syntax? And it works for the other shared printers that come up before it. It has to be something small. I am not hard coding the printer names I am getting them straight from the print server. Any help would be greatly appreciated.
NOTE: I see that other people on the net have had this issue but no solution has been posted in the last 2 years. That is why I am posting here.
' script snippet__________________________________________
Sub AddSharedPrinter 'add all shared printers on ABOR1
For Each objPrinter in colInstalledPrinters
'Printer name is constructed here \\server\printerName
strUNCPrinter = "\\" & objPrinter.SystemName & "\" & objPrinter.ShareName
'printer is added here
wscript.echo "printer up next " & strUNCPrinter
objNetwork.AddWindowsPrinterConnection strUNCPrinter '# this is the offending line #
Next
End Sub
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|