You are currently offline, waiting for your internet to reconnect

Your browser is out-of-date

You need to update your browser to use the site.

Update to the latest version of Internet Explorer

How to add printers with no user interaction in Windows

Support for Windows Server 2003 ended on July 14, 2015

Microsoft ended support for Windows Server 2003 on July 14, 2015. This change has affected your software updates and security options. Learn what this means for you and how to stay protected.

This article was previously published under Q189105
For a Microsoft Windows XP version of this article, see 314486.
Windows 2000 and Windows Server 2003 provide the ability to install a printer using a command line. This is particularly useful when you add or remove a printer from a group of users using a login script or a scheduled event.

Although Microsoft Windows NT 4.0 Zero Administration Kit (ZAK) contains tools such as Con2prt.exe, the Con2prt.exe tool provides the ability to add or delete only network printers. You can also modify and delete local printers using Windows 2000. The result is that an administrator can control all aspects of a user's ability to print by having users run a batch file or logon script.

NOTE: Using this command in a login script or a client-launched batch file requires the client computer to be running Windows 2000 or Windows Server 2003. Because the login script runs on the client computer, a Windows NT 4.0 client is unable to process the command.

In addition, these commands can be run from an administrator's workstation or from a server so that the printers are push-installed to the client computers without having to go to the actual computer.
The following examples list the most typical uses for the command.

NOTE: This command only runs on a Windows 2000-based or Windows Server 2003-based computer against a Windows 2000, Windows Server 2003, or a Windows NT 4.0 server or workstation.

This example adds an Agfa printer driver and creates a logical printer on a computer named SERVER.

NOTE: Both lines can be placed in a batch file or typed after each other at a command prompt. These two lines are wrapped for readability.
rundll32 printui.dll,PrintUIEntry /ia /c\\server /m "AGFA-AccuSet v52.3" /h "Intel" /v "Windows 2000" /f %windir%\inf\ntprint.inf

rundll32 printui.dll,PrintUIEntry /if /b "Test Printer" /c\\SERVER /f "%windir%\inf\ntprint.inf" /r "lpt1:" /m "AGFA-AccuSet v52.3"
This example deletes an AGFA printer on a computer named SERVER:
rundll32 printui.dll,PrintUIEntry /dl /n "Test Printer" /c\\SERVER
For more information about the available switches, type /? after the command.

In addition, at a command prompt, type:
rundll32 printui.dll,PrintUIEntry /?
The preceding command displays the entire list of usage switches with extensive examples for using this method.

Additionally, at a command prompt, type
rundll32 printui.dll,PrintUIEntry /Xs /n "printer" ?
The preceding command displays additional help for changing printer properties. The following example switches the current print driver to the specified new printer driver (already installed on the server):
rundll32 printui.dll,PrintUIEntry /Xs /n\\SERVER\PRINTERSHARENAME DriverName "Lexmark C752 PS3"

NOTE: The following syntax is an example that works correctly as long as the Standard TCP/IP Ports are created.
rundll32 printui.dll,PrintUIEntry /if /b "NORTH-US-SRTEST-TEST24-BOGUS" /f %windir%\inf\ntprint.inf /r "IP_157.57.50.98" /m "HP Laserjet 4000 Series PCL" /Z
If Standard TCP/IP Ports are not created, the following error dialog box may be experienced:
Printer User Interface
Printer rundll command failed.
Command: /if /b "NORTH-US-SRTEST-TEST24-BOGUS" /f %windir%\inf\ntprint.inf /r "IP_157.57.50.98" /m "HP Laserjet 4000 Series PCL" /Z.
You either entered a printer name that was incorrect or the specified printer is no longer connected to the server. Click Help for more information.
push install unattended user interaction 5.00 nt5howto print ntprint scripts automated automatic automatically

Article ID: 189105 - Last Review: 10/26/2007 15:50:13 - Revision: 5.5

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Web Edition
  • kbproductlink kbhowto kbprint KB189105
://"> var varClickTracking = 1; var varCustomerTracking = 1; var Route = "76500"; var Ctrl = ""; document.write(" m=document.createElement('meta');'ms.dqp0';m.content='false';document.getElementsByTagName('head')[0].appendChild(m);" src=""> >>