Unable to add USB printer through command line

G

Guest

Hello everyone,
I've been using the following command to programmatically add & install
LPT printers connected directly to WinXP computers. Everything goes ok with
that. However, when I try the same command to connect a USB printer, it
fails. Here is what I did.

rundll32 printui.dll,PrintUIEntry .... /r "LPT1:" ...
(The dots represents other paramteres that are non-relevant to my question)
Above command works OK !! with LPT printers.

Then, I assumed I would have to make below changes to make it work for USB
printers

rundll32 printui.dll,PrintUIEntry .... /r "USB001" ...

Still, the command gets processed successfully and the printer is added. BUT
!! I cannot print a test page, I get an error message that printing is failed
and the test page is visible at the printer queue. It will only work if I
manually change the port of that printer to another USB (2, 3, ...) from the
list of ports on printer properties. I don't know how to assign the right
port to a new printer using the command line.

I found no documentations on adding USB printers using the above command
(which is supposed to support USB ports).

I'd really really appreciate it if someone can help me out with this issue -
I've been invistigating on it for so long time.


Talib
 
S

Smiles

Talib said:
Hello everyone,
I've been using the following command to programmatically add & install
LPT printers connected directly to WinXP computers. Everything goes ok with
that. However, when I try the same command to connect a USB printer, it
fails. Here is what I did.

rundll32 printui.dll,PrintUIEntry .... /r "LPT1:" ...
(The dots represents other paramteres that are non-relevant to my question)
Above command works OK !! with LPT printers.

Then, I assumed I would have to make below changes to make it work for USB
printers

rundll32 printui.dll,PrintUIEntry .... /r "USB001" ...

Still, the command gets processed successfully and the printer is added. BUT
!! I cannot print a test page, I get an error message that printing is failed
and the test page is visible at the printer queue. It will only work if I
manually change the port of that printer to another USB (2, 3, ...) from the
list of ports on printer properties. I don't know how to assign the right
port to a new printer using the command line.

I found no documentations on adding USB printers using the above command
(which is supposed to support USB ports).

I'd really really appreciate it if someone can help me out with this issue -
I've been invistigating on it for so long time.


Talib
why command line
 
G

Guest

Because I am developing a script to install the printer driver and connect it
silently without any user intervention. Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top