Jump to content

Recommended Posts

Posted (edited)

All

 

Trying to deploy printers via group policy.

 

Background: 2003 R2 with all printers installed and shared, clients XP SP3

 

I've tried using pushprinterconnections.exe with 2003 R2 Printer console but the results are far from consistent (sometimes it took two reboots to add all printers, sometimes it just didn't add them), so I thought I'd switch to a simple .vbs script: Add a Printer Connection

 

This gives a similar experience. If I have two GPOs each with a single printer, it takes two logins for them both to be added.

 

Any ideas?

 

The XP machines don't have CSE installed yet, so I can't use GPP.

 

Ignore the attached image, I seem to have resolved that.

dSBW3.png

Edited by tom84
Posted

Can you post full script what you're using, no reason it shouldn't be working. We're using same design as the above site. (May just be a typo in your script)

 

Steve

Posted

Sure:

 

Set WshNetwork = CreateObject("WScript.Network")

WshNetwork.AddWindowsPrinterConnection "\\dc1\3rd Floor - 1 DUPLEX"

 

I've creating a separate GPO per printer, and I'm testing in an OU with two GPOs applied at the moment.

 

I can consistently replicate this by removing both printers + driver. First logon installs 1 of the printers, 2nd logon installs the next and I seem to be getting this regardless of deployment method (pushprinterconnections.exe or .vbs).

Posted
. First logon installs 1 of the printers, 2nd logon installs the next and I seem to be getting this regardless of deployment method (pushprinterconnections.exe or .vbs).

 

When you say that, Do you mean the first printer installs fine, then it errors on 2nd logon?

 

Steve

Posted

I'll rephrase!

 

It only seems to install 1 printer per login, and it isn't always the same printer out of the 2 applied via GPO.

 

E.G

 

Sometimes it'll connect Printer1 on 1st logon, then if I logoff/logon it'll connect to Printer2.

 

Sometimes it'll connect Printer2 on 1st logon, then if iI logoff/logon it'll connect to Printer1.

 

I don't see any errors or reasons as to why.

Posted

Can you try installing it this way:

 

Set WshShell = CreateObject("WScript.Shell")

WshShell.Run "RunDLL32 <\\server\share\drvsrv,Install> "<\\server\share>", 1, True

 

Some ways on older setups it'll complain if you're adding two printers using same driver, as it bases their name on the printer driver name.

 

Steve

  • Thanks 1
Posted

Don't you need the snippet of code that removes all printers first before adding them ??

 

Haven't got my coding hat on at the min heh

 

Also if you use the ip address of the DC or server and use shorter share names that are one word ?

Posted

Steve, you've picked up on a good point.

 

I've decided to deploy both printers via one .VBS with the original code I posted- which works great.

 

Having thought about it further, I don't need to get that granular with group policy. If they need one they'll want the other (basically one is single sided and one is duplex).

 

mac_shinobi, let me know if you remember anymore :)

 

Thanks for your efforts.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...