Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group Policy to install printers? 1

Status
Not open for further replies.

moetech

IS-IT--Management
Feb 13, 2002
101
US
Is it possible to install shared printers to pc's using GP? If so, How do you do it? I am looking for a way to install them with having to go to each pc.

THANKS
 
Kinda, sorta.

You can create scripts that run when machines startup and assign the scripts through GPOs. Place the GPO on the computers OU and drill down in the policy to "Computer Configuration, Windows Settings, Scripts". If you have an organized room/machine/number system it may not be too hard to pull this off.

Inside the script is where the magic takes place. One of the methods I use is the printui.dll. If you're not familiar with this, just type this (case sensitive) at a start/run prompt:

rundll32 printui.dll,PrintUIEntry /?

Below is a small example of what you can do in a WSH script. The PC that runs this section of the script will assign the printer RM114-DJ that is shared on the machine RM114-04. It will also install the print drivers to the PC running this script. The second printui statement will make this printer the default printer.

DJPrinterConnect = "rundll32 printui.dll,PrintUIEntry /in /n\\RM114-04\RM114-DJ /q"
SetDefaultPrinter = "rundll32 printui.dll,PrintUIEntry /y /n\\RM114-04\RM114-DJ"
WSHShell.Run DJPrinterConnect,0,True
WSHShell.Run SetDefaultPrinter,0,True


One last thing we ran into with Win2003 is that when we assigned printers in the startup script, we had to assign "Anonymous Logon" to the printer security tab.

Too much information?
[yawn] Bob
 
I created a .BAT file with contents :
rundll32 printui.dll,PrintUIEntry /in /n\\SERVER\HP4000N /u
rundll32 printui.dll,PrintUIEntry /y /n\\SERVER\HP4000N

Then I added this .BAT file to the location specified by the affected OU's GPO : Computer Configuration\Windows Settings\Scripts (Startup/Shutdown)\Startup

Also (bearing in mind Yawnbob's warning), for the networkprinter, I added in Security tab : "Anonymous Logon" with Allow Print, Allow Manage Printers and Allow Manage Documents.

Nevertheless, I obtain during execution of the startup script (i.e. before user logon) :
"Connect to Printer"
(X) Could not connect to the printer. Access is denied. [OK]
Followed by:
"Printer User Interface"
(X) Printer rundll command failed.
Command: /y /n\\SERVER\HP4000N. Access is denied. [OK]

Help ?
Is there no such easy thing like the good old CON2PRT.EXE to connect to a printer from within a script? Used to be very straightforward, without any hassle.
Really cannot believe things are this complex to achieve such a basic thing as connecting a default printer ???

All help highly appreciated.

 
Startup scripts run prior to authentication.
You want to put the scripts in the logon policy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top