Information Technology Reference
In-Depth Information
For example, to delete a port named IP_10.0.0.20 , locate and delete the key at the following:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\
Standard TCP/IP Port\Ports\IP_10.0.0.20
Using VBScript
You can delete a TCP/IP port used by your network printer by executing prnport.vbs , located
in the %systemroot%\system32 directory. Use the following syntax:
> cscript prnport.vbs -d -r < PortName > [-s < RemoteComputer >]
-h < IPAddress > [-u < UserName > -w < Password >]
Here is a description of the parameters:
- d : Required parameter that tells the script that you intend to delete a standard TCP/IP
printer port.
-r PortName : Required parameter that specifies the port to which the printer is connected.
-s RemoteComputer : Optional parameter that specifies the name of a remote computer
from which you want to delete the port. If this parameter is omitted, the port will be deleted
from the local print server.
-u UserName : Optional parameter that provides a username with permissions to delete the
port from a host. If you use this parameter, you must also specify the -w Password parameter.
-w Password : Optional parameter that provides a password to be used in conjunction with
the -u UserName parameter.
For example, to delete a TCP/IP printer port named IP_192.168.0.10 from the local host
using the supplied Administrator credentials, run the following command:
> cscript prnport.vbs -d -r IP_192.168.0.10 -u Administrator -w MyPassword
How It Works
You will typically delete TCP/IP printer ports when you retire network printers from operation
or when you make significant changes to their configuration and want to start with a new port
and its default settings. Windows will not allow you to delete the port if it is in use. Therefore, if
you want to delete the port but continue to use the printer, you must first assign a new port to
the printer, and then delete the original port.
See Also
Microsoft TechNet: “How Network Printing Works” ( http://technet2.microsoft.com/
WindowsServer/f/?en/Library/d58ce7b9-49cf-4f5e-95e9-1ade005c13e01033.mspx ). This
article provides descriptions and explanations of terminology, architecture, protocols, and
port assignments related to network printing.
Search WWH ::




Custom Search