Link to home
Start Free TrialLog in
Avatar of HRSBTech
HRSBTechFlag for Canada

asked on

Printer GPO fails, not all printers mapped

I have changed my GPO's and thought the problem was fixed but apperently wasn't. I had one GPO that mapped all printers but was advised to change it, I now have three scripts that map 7 printers, the first script is the actual GPO script and the other two scripts are called through the first .vbs script.

The first script looks like this... the second script calls three lab printers and the third calls 2 printers...

any help would be great!! so confussed...

matt

'-----------------------------------------------------------'
Option Explicit
Dim objNetwork, strLocal, strUNCPrinter1, strUNCPrinter2
strUNCPrinter1 = "\\dhs01\DHS_STAFF_PHOTO"
strUNCPrinter2 = "\\dhs01\DHS_STAFF_LASER"
Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection strUNCPrinter1
objNetwork.AddWindowsPrinterConnection strUNCPrinter2
objNetwork.SetDefaultPrinter strUNCPrinter2

runotherscript "DHS-staff-print-2.vbs"

Sub runotherscript(name)
  Dim oShell
  Set oShell = WScript.CreateObject("WSCript.shell")
  oShell.run name, 1, true
  Set oShell = Nothing
end sub



WScript.Quit
Avatar of HRSBTech
HRSBTech
Flag of Canada image

ASKER

this was all happing after installing a lexmark E250dn printer, i have removed it from the script and everything is working properly now, would one printer cause this script to break? it's a network printer, brand new... it prints and everything to it works fine?

matt
ASKER CERTIFIED SOLUTION
Avatar of HRSBTech
HRSBTech
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial