[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Windows 2000 & XP Standard IP printer Port creation

Posted on 2005-04-08
11
Medium Priority
?
1,736 Views
Last Modified: 2008-03-06
I am trying to automate the printer creation process for our users. I have managed to get this working forXp using the following command line script:

@Echo off
cscript %SystemRoot%\SYSTEM32\PRNMNGR.vbs -l >c:\prnlist.txt
findstr /C:"UKPSH Printer82 Colour" c:\prnlist.txt
if not errorlevel 1 goto END
goto next
:next
cscript %SystemRoot%\SYSTEM32\PRNPORT.vbs -a -r IP_168.156.39.82 -h 168.156.39.82 -o raw -n 9100 -me -i 1
cls
@Echo Printer installing - Please wait.
rundll32 printui.dll,PrintUIEntry /if /b "Printer82 Colour" /f "\\winserver1\drivers\hp2000c\hp2x00c.inf" /r IP_168.156.39.82 /m "HP 2500C Series Printer" /z
:END
del /q c:\prnlist.txt

As I said before the above script works beautifully for XP, however Win 2000 does not have or support the PRNPORT.VBS. This file is installed with Xp but not 2k. I have copied it over but it errors when run.

Does anyone know of a method to create a IP printer port that will work for both OS's?
0
Comment
Question by:hotdiggetydawg
  • 6
  • 3
  • 2
11 Comments
 
LVL 25

Expert Comment

by:InteractiveMind
ID: 13735153
Hey.

Let's try and get the PRNPORT.VBS script to work with it first, before looking into alternative methods..
What error do you get on the W2K machine, when you attempt to use the PRNPORT.VBS script?

Regards;
0
 
LVL 5

Expert Comment

by:dr_binks
ID: 13735886
actually, I have a question for you, im writting simalar scripts for the network at work.
does the printer part work ok if you are a normal user? because it sure dosnt work on my system.

however, all my clients are xp so I havent searched for a 2k method...

I did come across con2prt.exe which is supposed to be for NT4 printer management, maybe you could see if that works.

~Binks
0
 

Author Comment

by:hotdiggetydawg
ID: 13736018
after running :

cscript %SystemRoot%\SYSTEM32\PRNPORT.vbs -a -r IP_168.156.39.82 -h 168.156.39.82 -o raw -n 9100 -me -i 1


I get the following error:

Unable to parse command line. Error 0x1A8 Object required.


I guessthat this VBS script was originally written for Xp was the reason for it failing, am I correct?
Can it be modified to run on 2k as well? I'm not that well versed in VB Im afraid.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 5

Expert Comment

by:dr_binks
ID: 13736044
vbs, I think should work on all OS's from win2k to win2k3.

0
 

Author Comment

by:hotdiggetydawg
ID: 13736375
Hey dr_binks

Yep it works a treat but thats probably because they have the rights to at the workstation to add printers. The users run via a web page and apart from the prompt to open or save the CMD file (which they click run)
0
 
LVL 25

Assisted Solution

by:InteractiveMind
InteractiveMind earned 500 total points
ID: 13736399
Okay.. what is: cscript ?
Is it: cscript.exe ?

If so; that would appear to be the problem; it's not compatible with W2K, or you need to do some extra config to get it to work...

?
0
 

Author Comment

by:hotdiggetydawg
ID: 13737588
Well Cscript.exe runs fine on windows 2000 here.
0
 
LVL 5

Accepted Solution

by:
dr_binks earned 500 total points
ID: 13738584
just remebered, is the printer port already  created on the 2k machines?
when I was reading the MS info on using printui.dll it said that if the printer port IP_xxx.xxx.xxx.xxx isnt already created on the machine, the script wont work.
0
 

Author Comment

by:hotdiggetydawg
ID: 13743212
No the printer port is not installed that is the problem I am trying to fix. the line in the script creates the printer port in win xp but not 2000, does anyone know a scripting method working for both operating systems?
0
 

Author Comment

by:hotdiggetydawg
ID: 13754972
Anyone else out there got any ideas?
0
 

Author Comment

by:hotdiggetydawg
ID: 13755184
dont worry Ive sorted it out
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Six Sigma Control Plans

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question