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.