Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


Return to article

Predefine Printers for Computer Lab Users
 

In a computer lab that different people use every day, you need to define the network printers for everyone by default. Windows 2000 lets an administrator easily configure a locally attached printer, which then automatically appears in the printer list for all system users. Configuring a network printer presents more of a challenge.

Many administrators use logon scripts to define the appropriate printers on a system for users. However, you can use a one-time operation that doesn't require logon scripts to complete this task.

Go to a command prompt and enter

rundll32.exe printui.dll,PrintUIEntry <options>

The name of the entry point is case sensitive.

The /? option will give you a list of all the other options. The option you'll probably use most often is /ga /n\\server\printer. This command globally adds a printer that points to a print server queue.

To run the command remotely, simply add /c\\computername. You can combine these commands to easily set up an entire lab of computers in just a few minutes. To point to the lab's printer, use a list of commands such as

rundll32.exe printui.dll,
PrintUIEntry /ga /n\server\labprinter /c\labcomputer1

The next time a user logs on to the machine, the printer will automatically appear in the user's list of defined printers and in the Settings, Printers window. A limitation is that the command is computer-specific; if the user moves to another computer, the printer will no longer appear. If you add more than one printer, the first printer in the alphabetical list will be the user's default printer unless the user overrides it.

To check existing settings, use the command /ge. To delete settings, use /gd. The Microsoft Windows 2000 Server Resource Kit only briefly mentions this printing system management interface. In addition, the program has only one Help screen (i.e., Documentation). Experiment with the command to determine how to use it to meet your needs. The command works equally well for lab computers and in an office environment in which users occasionally share computers.







Reader Comments

This works fine under Windows 2000. But I need it under NT4.0. Do you have an idea?

Gita Schwarzmeier -April 21, 2004

using vbscript I can not setup printers link /ga option of this command line! Do you know how?

Anonymous User -November 09, 2004

I found this article to be a lifesaver for remotely installing windows shared printers, ie the \\ServerName\ShareName variety. However, how do you remotely install JetDirect or "Standard TCP/IP Printers?"

RobertJTownley -February 04, 2005

Will this work for IP Printers as well?

pJw032684 -February 14, 2005

'However, how do you remotely install JetDirect or "Standard TCP/IP Printers?"' In the options, you can specify the port. I have used this before, but haven't reviewed the options in detail yet: rundll32 printui.dll,PrintUIEntry /b "HP Laserjet 4100" /if /f %windir%\inf\ntprint.inf /r "IP_192.168.1.7" /m "HP LaserJet 4100 Series PCL" You may have to first create that IP port. There are vb scripts around that do it. I used this: Set objWMIService = GetObject("winmgmts:") Set objNewPort = objWMIService.Get _ ("Win32_TCPIPPrinterPort").SpawnInstance_ objNewPort.Name = "IP_192.168.1.7" objNewPort.Protocol = 1 objNewPort.HostAddress = "192.168.1.7" objNewPort.PortNumber = "9100" objNewPort.SNMPEnabled = False objNewPort.Description = "hp4100.frentic.lan" objNewPort.Put_

Anonymous User -March 07, 2005

Does this work with server 2003 using batch file scripts.

Anonymous User -March 12, 2005
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement