Adding a printer using rundll32 printui.dll,PrintUIEntry

Archived from groups: microsoft.public.windowsxp.general (More info?)

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
3 answers Last reply
More about adding printer rundll32 printui printuientry
  1. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Dave Fitton wrote:
    > 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.
  2. Archived from groups: microsoft.public.windowsxp.general (More info?)

    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


    "Tom Porterfield" wrote:

    > Dave Fitton wrote:
    > > 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.
    >
  3. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Dave Fitton wrote:
    > 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 new question

Read More

Rundll32 DLL Printers Servers Windows XP