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


August 2003

Predefine Printers for Computer Lab Users

RSS
Subscribe to Windows IT Pro | See More Printing Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

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.

End of Article



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 (Article Rating: )


Will this work for IP Printers as well?


pJw032684 February 14, 2005 (Article Rating: )


'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 (Article Rating: )


Does this work with server 2003 using batch file scripts.

Anonymous User March 12, 2005 (Article Rating: )


You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...


Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Managing IT Across Multiple Locations

Configuration Manager SP1 and R2 Overview

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


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