1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Assigning default printers

Discussion in 'Hardware' started by philbenson, Nov 13, 2007.

  1. philbenson

    philbenson Byte Poster

    208
    1
    20
    I've been using commands similar to the one below on order to install networked printer connections at the machine level.

    c:\windows\system32\rundll32 PrintUI.dll,PrintUIEntry /ga /c "\\computername" /n "\\servername\sharename"

    to configure network printers to various networked PCs in a Windows Server 2003 domain. However a few of the PCs also have local printers attached as well - mostly HP Deskjet variants. Users have these local printers only as a backup in case the network printer becomes unavailable.

    The rundll32 command runs fine and connects the printer regardless of the uer logged on. The problem is that as Windows (XP) boots, it detects the local printer and sets it as the default. I've look though a list of the various parameters and switches associated with the PrintUIEntry option but cannot find any relating to configuring default printers.

    Obviously users can simply change the selected printer through the Print menu but we are dealing here with primary school children.

    Previously the printers were configured via vb scripts through associated GPOs. Sometimes that worked sometimes it didn't. At least now I can be sure that all users will have access to the right printer - now I just need to find a way of forcing the network printer as the default. Any ideas?
     
    Certifications: MCP, MCP+I, MCSE, MCSA, MCTS
    WIP: CCNA(?)
  2. Stoney

    Stoney Megabyte Poster

    731
    23
    69
    Hmmm, I wouldn't know how to do it by using the run command.

    It can be done if you know write a script that uses the Win32_Printer class. There is a SetDefaultPrinter method you can use.

    This can also be executed remotely which is a bonus. 8)

    Found this little script that may help you out.
     
    Certifications: 25 + 50 metre front crawl
    WIP: MCSA - Exam 70-270
  3. Modey

    Modey Terabyte Poster

    2,397
    99
    154
    You could try using Con2Print. As far as I am aware it's a freely downloadable utility from MS. One of the switched lets you specify a default network printer, so it would probably sort the problem for you.
     
    Certifications: A+, N+, MCP, MCDST, MCSA 2K3, MCTS, MOS, MTA, MCT, MCITP:EDST7, MCSA W7, Citrix CCA, ITIL Foundation
    WIP: Nada

Share This Page

Loading...