Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows VistaWindows XPWindows MeWindows 98Windows 95Virtual PCInternet ExplorerOutlook ExpressWindows MediaSecurity
Related Topics
MS Server ProductsMS OfficePC HardwareMore Topics ...

Windows Forum / Windows XP / Printing and Faxing / January 2006

Tip: Looking for answers? Try searching our database.

Adding a printer/port Commandline - Auto installing printers/portd

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fiji Smithy - 27 Jan 2006 17:46 GMT
I am trying to install TCP/IP printers via command line on my Windows XP pro
using the following command I get this:

C:\WINDOWS\system32>cscript prnport.vbs -a -r IP_172.16.41.54
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Unable to create/update port IP_172.16.41.54 Error 0x80041008 Invalid
parameter

Anyone know what's going wrong and how I can fix it?
Alan Morris [MSFT] - 27 Jan 2006 19:59 GMT
requires a hostname parameter (or IP address)

-h
prnport -a -r IP_1.2.3.4 -h 1.2.3.4

the r parameter is only the port name and that does not have to be the same
as the  -h parameter

If the network card of the printer is in tcpmon.ini then the wmi process
will consume your CPU cycles (on XP) due to a bug in cimwin32.dll

Pass in the -o parameter to work around this

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

Signature

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.

>I am trying to install TCP/IP printers via command line on my Windows XP
>pro
[quoted text clipped - 8 lines]
>
> Anyone know what's going wrong and how I can fix it?
Fiji Smithy - 27 Jan 2006 20:12 GMT
I then added the IP address and it hangs. Does the PC and the TCP/IP printer
have to be in the same subnet?

That doesn't make sense because the wizzard will do it but the command line
will not.

c:\ cscript prnport.vbs -a -r IP_PRINTER -h 172.16.41.54 <-This command
hangs the process
I am 172.17.96.108

> requires a hostname parameter (or IP address)
>
[quoted text clipped - 41 lines]
> >
> > Anyone know what's going wrong and how I can fix it?
Alan Morris [MSFT] - 27 Jan 2006 22:16 GMT
As I stated in my  previous post, there is a bug in the WMI provider.  This
has been fixed in Server but no customer has reported the problem to MS on
Windows XP.  Feel free to report it, since it's the only why it will be
fixed.

What printer are you targeting.  HP and Lexmark use -o raw.  Other
manufactures have different settings.  You need to read the documentation
for the network card on the printer.

> If the network card of the printer is in tcpmon.ini then the wmi process
> will consume your CPU cycles (on XP) due to a bug in cimwin32.dll
>
> Pass in the -o parameter to work around this

Signature

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.

>I then added the IP address and it hangs. Does the PC and the TCP/IP
>printer
[quoted text clipped - 54 lines]
>> >
>> > Anyone know what's going wrong and how I can fix it?
Fiji Smithy - 30 Jan 2006 21:05 GMT
Perfect so I can add the port no problem but now I'm having problems adding
the pritners with an .INF file. I have downloaded the drivers for the printer
and stored them in C:\2135ps2k\

I am executing the command:
rundll32 printui.dll,PrintUIEntry /if /b "Colour-EDM" /f
"C:2135ps2k\XP2135PS.INF"  /r "IP_172.16.42.71" /m "Xerox Phaser 2135 PS" /z
/u

When I hit enter I get a message that says Operation could not be complete.
Any ideas why?

> As I stated in my  previous post, there is a bug in the WMI provider.  This
> has been fixed in Server but no customer has reported the problem to MS on
[quoted text clipped - 68 lines]
> >> >
> >> > Anyone know what's going wrong and how I can fix it?
Alan Morris [MSFT] - 31 Jan 2006 06:37 GMT
try
/f C:\2135ps2k\XP2135PS.INF

you can also use prndrvr.vbs and prnmngr.vbs

prndrvr -a -m "Xerox Phaser 2135 PS" -v 3 -e "Windows NT x86" -i
C:\2135ps2k\XP2135PS.INF -h C:\2135ps2k
prnmngr -a -m "Xerox Phaser 2135 PS" -r IP_172.16.42.71 -p "Colour-EDM"

Signature

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.

> Perfect so I can add the port no problem but now I'm having problems
> adding
[quoted text clipped - 91 lines]
>> >> >
>> >> > Anyone know what's going wrong and how I can fix it?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.