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!

Setup printers for all users on a workstation

Status
Not open for further replies.

Peahippo

MIS
Jul 18, 2003
91
US
How do I setup network printers so that anyone who logs onto an XP machine has them by default?

For some reason, the job I've inherited has been using the "user will call the help desk when they need a printer installed" method. It seems silly that I have to run from machine to machine in a department, when a new network printer is installed, and have each user logon and then setup the printer. It also seems silly that when I replace a machine, I still need to have the user logon before I can setup the printers they are used to connecting to. There's gotta be a better way.
 
Here is one good way to handle this: thread779-581142 you can push the batch files, or in a Domain you can use the logon script.
 
Thanks for the help. From your reference, here's the script I made, and it worked on an XP workstation I setup just today:
Code:
@ECHO off
REM xp_setup_prn_allusers.bat
REM
REM /in       : add network printer connection
REM /n [name] : printer name
REM /y        : set printer as the default
REM
REM Run "RUNDLL32 printui.dll,PrintUIEntry /?" to see all switches.
IF "%1"=="" GOTO ErrNoPrn
IF "%1"=="/?" GOTO Help
IF "%1"=="/h" GOTO Help
IF "%1"=="/H" GOTO Help
IF "%1"=="/help" GOTO Help
IF "%1"=="/HELP" GOTO Help
IF "%1"=="/Help" GOTO Help
IF "%2"=="" GOTO OnePrn
:TwoPrn
RUNDLL32 printui.dll,PrintUIEntry /in /n \\SERVER\%1 /y
RUNDLL32 printui.dll,PrintUIEntry /in /n \\SERVER\%2
GOTO TheEnd
:OnePrn
RUNDLL32 printui.dll,PrintUIEntry /in /n \\SERVER\%1
RUNDLL32 printui.dll,PrintUIEntry /in /n \\SERVER\%1 /y
GOTO TheEnd
:ErrNoPrn
ECHOECHO Error: no print queue name or names given.
GOTO Help
:Help
ECHOECHO xp_setup_prn_allusers
ECHOECHO Setup 1 or 2 network printers in Windows XP for all users, 
ECHO regardless of logon, under print server SERVER.  The first 
ECHO printer name given will be the primary printer.
ECHOECHO Example:
ECHOECHO xp_setup_prn_allusers p0202
ECHO xp_setup_prn_allusers p0701 p0704
GOTO TheEnd
:TheEnd
ECHO
 
Looks good. I caution you that if it is a new printer never defined before it often helps to make the statement twice if it is also being set as the default printer, rather than attempt it in one statement.

Don not know why, but it does happen. In other words, make your TwoPrn more closely resemble your OnePrn.

Best wishes,
Bill Castner

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top