Go Back   TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



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

Windows XP Support


Reply
 
Thread Tools Search this Thread
  #1  
Old 27-01-2006
Fiji Smithy
 
Posts: n/a
Adding a printer/port Commandline - Auto installing printers/portd

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?

Reply With Quote
  #2  
Old 28-01-2006
Alan Morris [MSFT]
 
Posts: n/a
Re: Adding a printer/port Commandline - Auto installing printers/portd

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


--
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.

"Fiji Smithy" <greg.smith@telus.net> wrote in message
news:A3B8AA8A-E317-45BD-AE05-2D73610C1DC3@microsoft.com...
>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?



Reply With Quote
  #3  
Old 28-01-2006
Fiji Smithy
 
Posts: n/a
Re: Adding a printer/port Commandline - Auto installing printers/p

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



"Alan Morris [MSFT]" wrote:

> 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
>
>
> --
> 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.
>
> "Fiji Smithy" <greg.smith@telus.net> wrote in message
> news:A3B8AA8A-E317-45BD-AE05-2D73610C1DC3@microsoft.com...
> >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?

>
>
>

Reply With Quote
  #4  
Old 28-01-2006
Alan Morris [MSFT]
 
Posts: n/a
Re: Adding a printer/port Commandline - Auto installing printers/p

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
>



--
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.

"Fiji Smithy" <greg.smith@telus.net> wrote in message
news:F9EC6927-8607-4FF5-AE35-A0C780688B71@microsoft.com...
>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
>
>
>
> "Alan Morris [MSFT]" wrote:
>
>> 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
>>
>>
>> --
>> 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.
>>
>> "Fiji Smithy" <greg.smith@telus.net> wrote in message
>> news:A3B8AA8A-E317-45BD-AE05-2D73610C1DC3@microsoft.com...
>> >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?

>>
>>
>>



Reply With Quote
  #5  
Old 31-01-2006
Fiji Smithy
 
Posts: n/a
Re: Adding a printer/port Commandline - Auto installing printers/p

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?

"Alan Morris [MSFT]" wrote:

> 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
> >

>
>
> --
> 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.
>
> "Fiji Smithy" <greg.smith@telus.net> wrote in message
> news:F9EC6927-8607-4FF5-AE35-A0C780688B71@microsoft.com...
> >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
> >
> >
> >
> > "Alan Morris [MSFT]" wrote:
> >
> >> 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
> >>
> >>
> >> --
> >> 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.
> >>
> >> "Fiji Smithy" <greg.smith@telus.net> wrote in message
> >> news:A3B8AA8A-E317-45BD-AE05-2D73610C1DC3@microsoft.com...
> >> >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?
> >>
> >>
> >>

>
>
>

Reply With Quote
  #6  
Old 31-01-2006
Alan Morris [MSFT]
 
Posts: n/a
Re: Adding a printer/port Commandline - Auto installing printers/p

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"

--
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.

"Fiji Smithy" <greg.smith@telus.net> wrote in message
news:2D483BF3-F794-4C34-A875-1261BA7CD8E4@microsoft.com...
> 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?
>
> "Alan Morris [MSFT]" wrote:
>
>> 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
>> >

>>
>>
>> --
>> 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.
>>
>> "Fiji Smithy" <greg.smith@telus.net> wrote in message
>> news:F9EC6927-8607-4FF5-AE35-A0C780688B71@microsoft.com...
>> >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
>> >
>> >
>> >
>> > "Alan Morris [MSFT]" wrote:
>> >
>> >> 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
>> >>
>> >>
>> >> --
>> >> 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.
>> >>
>> >> "Fiji Smithy" <greg.smith@telus.net> wrote in message
>> >> news:A3B8AA8A-E317-45BD-AE05-2D73610C1DC3@microsoft.com...
>> >> >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?
>> >>
>> >>
>> >>

>>
>>
>>



Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Adding a printer/port Commandline - Auto installing printers/portd"
Thread Thread Starter Forum Replies Last Post
Script to Install Printer Drivers w/o adding printer witecoko Windows XP Support 7 13-03-2013 11:32 AM
Problems Installing USB Printers under Windows XP KABIRA16 Hardware Peripherals 5 17-10-2010 01:46 AM
Installing Network Printers in Windows 7 64 bit Wadee Hardware Peripherals 7 18-08-2010 01:14 PM
"Standard TCP/IP port" option missing when adding printer Allanoo Windows XP Support 2 25-05-2010 06:50 PM
Printer settings could not be saved on port setup of printer Nadeem Windows XP Support 3 26-04-2007 02:08 AM


All times are GMT +5.5. The time now is 02:45 AM.