We help IT Professionals succeed at work.
Get Started

Printer GPO fails, not all printers mapped

Last Modified: 2010-04-20
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...


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

Watch Question
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE