XP printer port addition scripting

G

Guest

I am using a script found on the script center. It doesn't give me enough
detail. I am looking to add a local standart tcp/ip port with custom
settings. It is LPR with a queue name of queue1. Is there a place to find
the additional lines of code to make the printer port setup this way. I am
runnning this to automate the printer setup.
 
A

Alan Morris\(MSFT\)

\system32\prnport.vbs /?

E:\>prnport /?
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Usage: prnport [-adlgt?] [-r port][-s server][-u user name][-w password]
[-o raw|lpr][-h host address][-q queue][-n number]
[-me | -md ][-i SNMP index][-y community][-2e | -2d]
Arguments:
-a - add a port
-d - delete the specified port
-g - get configuration for a TCP port
-h - IP address of the device
-i - SNMP index, if SNMP is enabled
-l - list all TCP ports
-m - SNMP type. [e] enable, [d] disable
-n - port number, applies to TCP RAW ports
-o - port type, raw or lpr
-q - queue name, applies to TCP LPR ports
-r - port name
-s - server name
-t - set configuration for a TCP port
-u - user name
-w - password
-y - community name, if SNMP is enabled
-2 - double spool, applies to TCP LPR ports. [e] enable, [d] disable
-? - display command usage

Examples:
prnport -l -s server
prnport -d -s server -r IP_1.2.3.4
prnport -a -s server -r IP_1.2.3.4 -h 1.2.3.4 -o raw -n 9100
prnport -t -s server -r IP_1.2.3.4 -me -y public -i 1 -n 9100
prnport -g -s server -r IP_1.2.3.4
prnport -a -r IP_1.2.3.4 -h 1.2.3.4

Remark:
The last example will try to get the device settings at the specified IP
address
..
If a device is detected, then a TCP port is added with the preferred
settings fo
r that device.

--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top