Installing networked printer with printui.dll

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to do remote installation of printers using the command : "Rundll32 Printui.dll,PrintUIEntry" with very little success. The printer that I am trying to install is a tcp/ip networked printer, not a shared printer. To simplify troubleshooting, I've tried running simplier(than installation) commands. For instance, to pull up the Properties box for a printer that I have installed on my local PC, I can do this

Rundll32 Printui.dll,PrintUIEntry /p /n "HP4050 (Office)

and I get the properties box. However, if I try to access a tcp/ip networked printer that has been installed on another PC, as in

Rundll32 Printui.dll,PrintUIEntry /p /c \\butterfly /n "HP 2300" o
Rundll32 Printui.dll,PrintUIEntry /p /n \\butterfly\"HP 2300" o
Rundll32 Printui.dll,PrintUIEntry /p /c \\butterfly /r "IP_HP 2300" where IP_HP2300 is the port name on that host. I get the error message

"Operation could not be completed. Either the printer name was typed incorrectly, or the specified printer has lost its connection to the server.

All other commands that I've tried, including installs, fail. Am I just using the wrong combination of options, or can it just not be done

TIA
Rand
 
http://members.shaw.ca/bsanders/NetPrinterAllUsers.htm

looks like you need to do the full path to the pinter.

See the link to see if this helps. Works for me using
both shared printer and networked printers.
-----Original Message-----
I'm trying to do remote installation of printers using
the command : "Rundll32 Printui.dll,PrintUIEntry" with
very little success. The printer that I am trying to
install is a tcp/ip networked printer, not a shared
printer. To simplify troubleshooting, I've tried running
simplier(than installation) commands. For instance, to
pull up the Properties box for a printer that I have
installed on my local PC, I can do this:
Rundll32 Printui.dll,PrintUIEntry /p /n "HP4050 (Office)"

and I get the properties box. However, if I try to
access a tcp/ip networked printer that has been installed
Rundll32 Printui.dll,PrintUIEntry /p /c \\butterfly /n "HP 2300" or
Rundll32 Printui.dll,PrintUIEntry /p /n \\butterfly\"HP 2300" or
Rundll32 Printui.dll,PrintUIEntry /p /c
\\butterfly /r "IP_HP 2300" where IP_HP2300 is the port
name on that host. I get the error message:
"Operation could not be completed. Either the printer
name was typed incorrectly, or the specified printer has
lost its connection to the server."
All other commands that I've tried, including installs,
fail. Am I just using the wrong combination of options,
or can it just not be done?
 
----- (e-mail address removed) wrote: ----

http://members.shaw.ca/bsanders/NetPrinterAllUsers.ht

looks like you need to do the full path to the pinter

Don't understand. What would be the full path to a tcp/ip printer - the IP address?

I saw that page, but the example is for printers "networked" by Windows networking, i.e., a shared printer on a Windows network, referenced by \\machine\printer name...

Rand

See the link to see if this helps. Works for me using
both shared printer and networked printers
-----Original Message----
I'm trying to do remote installation of printers using
the command : "Rundll32 Printui.dll,PrintUIEntry" with
very little success. The printer that I am trying to
install is a tcp/ip networked printer, not a shared
printer. To simplify troubleshooting, I've tried running
simplier(than installation) commands. For instance, to
pull up the Properties box for a printer that I have
installed on my local PC, I can do thisaccess a tcp/ip networked printer that has been installed
on another PC, as in
\\butterfly /n "HP 2300" o
Rundll32 Printui.dll,PrintUIEntry /p /n \\butterfly\"HP 2300" o
Rundll32 Printui.dll,PrintUIEntry /p /c
\\butterfly /r "IP_HP 2300" where IP_HP2300 is the port
name on that host. I get the error messagename was typed incorrectly, or the specified printer has
lost its connection to the server.fail. Am I just using the wrong combination of options,
or can it just not be done
 
How about using the WMI print provider? There are several prn*.vbs scripts
in system32. All the machines need to be XP pro or greater.
create the TCP Port
prnport -a -r IP_1.2.3.4 -h 1.2.3.4 -o raw -n 9100
then
prnmngr -a -p "printer" -m "driver" -r "IP_1.2.3.4"

you can run this in a local script or target a remote system with the -s
switch.

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

Randy Sebra said:
----- (e-mail address removed) wrote: -----

http://members.shaw.ca/bsanders/NetPrinterAllUsers.htm

looks like you need to do the full path to the pinter.

Don't understand. What would be the full path to a tcp/ip printer - the IP address??

I saw that page, but the example is for printers "networked" by Windows
networking, i.e., a shared printer on a Windows network, referenced by
\\machine\printer name....
 
Alan,

----- Alan Morris(MSFT) wrote: -----

How about using the WMI print provider? There are several prn*.vbs scripts
in system32. All the machines need to be XP pro or greater.
create the TCP Port
prnport -a -r IP_1.2.3.4 -h 1.2.3.4 -o raw -n 9100
then
prnmngr -a -p "printer" -m "driver" -r "IP_1.2.3.4"

you can run this in a local script or target a remote system with the -s
switch.

I've tried using this, but I have encountered a basic problem. The commands run locally, but not on a remote system. For instance, the command:

cscript prnport.vbs -l

runs fine and give me a list of ports on the local machine. However, whenever I try (logged on with an administrator account) something like:

cscript prnport.vbs -l -s IP_address (or system name)

I get the error message:

"Unable to connect to WMI service Error 0x80040154 Class not registered".

I'm begining to think that maybe something is not running on the remote machine, or that a permission required is not set - we run a locked-down environment....

Randy
 
Back
Top