I'm a novice with scripting. Can you give me the rest of the script?
Thanks,
Main Topics
Browse All TopicsI need to add multiple Standard TCP/IP printer ports to several computers in our office. I'd like to do this via a script. I know I can add them using the following command from the c:\windows\system32 path at the command line "cscript prnport.vbs -a -r 192.168.1.51 -h 192.168.1.51 -o raw -n 9100". But this adds only one port at a time and involves manual entry. How do I write a script to add four ports at once? All of the workstations are Windows XP.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
prnport.vbs is a script that is built into Windows XP. It's located in \windows\system32. \To run the script with the info you need you would open a command window, browse to the windows\system32 directory and enter "cscript prnport.vbs -a -r SCRIPT_NAME -h 192.168.1.11 -o raw -n 9100"
I entered the following into a batch file and ran it.
"@for %%a in (51 52 53 54) do cscript prnport.vbs -a -r 192.168.1.%%a -h 192.168.1.%%a -o raw -n 9100"
It didn't add the ports. The prnport.vbs script needs to be activated from the c:\windows\system32 directory, which is probably why the ports weren't added. Is there a way to get the script to run from that location?
Thanks again
Business Accounts
Answer for Membership
by: sirbountyPosted on 2007-04-23 at 03:06:47ID: 18957113
Something like this in a batch file perhaps...
@for %%a in (51 52 53 54) do cscript prnport.vbs -a -r 192.168.1.%%a -h 192.168.1.%%a -o raw -n 9100