Although Microsoft Windows NT 4.0 contains tools such as Con2prt.exe, Con2prt.exe permits you to add or delete only network printers. You can modify and delete local printers by using Windows XP. The result is that an administrator can control all aspects of a user's ability to print by requiring users to run a batch file or logon script.
Note If you use this command in a logon script or a client-based batch file, the client computer must be running Windows XP or Microsoft Windows 2000. Because the logon script runs on the client computer, a Windows NT 4.0 client cannot process the command.
Additionally, 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 install from the actual computer.
Note This command runs only on a Windows XP or Windows 2000-based computer; and it can be used only to install a printer on, or remove a printer from, a Windows XP, Windows 2000, or Windows NT 4.0-based server or workstation.
The following 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"
rundll32 printui.dll,PrintUIEntry /dl /n "Test Printer" /c\\SERVER
/? after the command.
Additionally, type the following at a command prompt:
rundll32 printui.dll,PrintUIEntry /?
Note The following sample syntax works correctly as long as the standard TCP/IP ports are created:
rundll32 printui.dll,PrintUIEntry /if /b "Test Printer" /f
%windir%\inf\ntprint.inf /r "IP_18.104.22.168" /m "HP Laserjet 4000 Series PCL" /Z
Printer rundll command failed.
Command: /if /b "Test Printer" /f %windir%\inf\ntprint.inf /r "IP_22.214.171.124" /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.
Sample of How to Add an IPP Printer
The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.
รหัสบทความ: 314486 - การตรวจสอบครั้งสุดท้าย: 22 ต.ค. 2008 - ฉบับแก้ไข: 1