Adding a printer using rundll32 printui.dll,PrintUIEntry

G

Guest

I'm currently moving my Network printing to a Windows 2003 Server based print
server (called PR01). I've set up numerous shared printers on my server (set
up as local printers using a TCPIP port) and now want to setup the printers
on my client machines (mixture of XP and 2000).

I can successfully add a printer to a client machine by START, RUN and
typing \\PR01\PRINTERNAME (eg \\PR01\Holistics HP5 is one of my printers)

However, I want to automate the printer installs using "rundll32
printui.dll,PrintUIEntry" command. eg

rundll32 printui.dll,PrintUIEntry /n\\pr01\holistics hp5

When I try the command I get the error - Operation could not be completed.
Either the printer name was typed incorrectly, or the specified printer has
lost its connection to the server.

I know I'm typing the correct printername (as it works manually using START,
RUN)
Have I got the wrong syntax?? (Does it matter about spaces in the printername)

Thanks
Dave Fitton
 
T

Tom Porterfield

Dave said:
I'm currently moving my Network printing to a Windows 2003 Server based print
server (called PR01). I've set up numerous shared printers on my server (set
up as local printers using a TCPIP port) and now want to setup the printers
on my client machines (mixture of XP and 2000).

I can successfully add a printer to a client machine by START, RUN and
typing \\PR01\PRINTERNAME (eg \\PR01\Holistics HP5 is one of my printers)

However, I want to automate the printer installs using "rundll32
printui.dll,PrintUIEntry" command. eg

rundll32 printui.dll,PrintUIEntry /n\\pr01\holistics hp5

When I try the command I get the error - Operation could not be completed.
Either the printer name was typed incorrectly, or the specified printer has
lost its connection to the server.

I know I'm typing the correct printername (as it works manually using START,
RUN)
Have I got the wrong syntax?? (Does it matter about spaces in the printername)

Since this is a network printer you are adding, I believe the correct
syntax would be as follows:

rundll32.exe printui.dll,PrintUIEntry /in /n\\pr01\holistics hp5

I'm not sure if the printer name would need to be in quotes since it has
a space.

You might also find this article of interest:

Adding a network printer for all Users
http://members.shaw.ca/bsanders/NetPrinterAllUsers.htm
--
Tom Porterfield
MS-MVP Windows
http://support.telop.org

Please post all follow-ups to the newsgroup only.
 
G

Guest

Thanks Tom,

rundll32.exe printui.dll,PrintUIEntry /in /n\\pr01\holistics hp5 worked fine

I now want to combine it with the /ga switch to install for all users ie.

rundll32.exe printui.dll,PrintUIEntry /ga /in /n\\pr01\holistics hp5

This installs the printer ok but when I login as another user the printer
is'nt there. I've stopped and started the print spooler

Any ideas

Dave
 
T

Tom Porterfield

Dave said:
Thanks Tom,

rundll32.exe printui.dll,PrintUIEntry /in /n\\pr01\holistics hp5 worked fine

I now want to combine it with the /ga switch to install for all users ie.

rundll32.exe printui.dll,PrintUIEntry /ga /in /n\\pr01\holistics hp5

This installs the printer ok but when I login as another user the printer
is'nt there. I've stopped and started the print spooler

Any ideas

Not sure. I recommend you try posting in
news://msnews.microsoft.com/microsoft.public.windowsxp.print_fax.
--
Tom Porterfield
MS-MVP Windows
http://support.telop.org

Please post all follow-ups to the newsgroup only.
 

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