Windows Vista Forums

Using a script to set the default printer at start up after adding it
  1. #1


    SlickRCBD Guest

    Using a script to set the default printer at start up after adding it

    How do I set the default printer using a batch file? Due to problems
    with a win98se printer share that ONLY happens with Vista 64 HP, I
    need to reinstall the printer every time I reboot. With help in
    previous posts, I have the following technically two-line batch file
    so far:


    rundll32 printui.dll,PrintUIEntry /dl /n "hp812c" /c\\GATEWAY
    rundll32 printui.dll,PrintUIEntry /if /b "HP812c" /c\\GATEWAY /f
    "%windir%\inf\ntprint.inf" /r "\\Slickswintel\hp812c" /m "HP DeskJet
    812C"






    I need a final line to set the newly created HP812C to be the default
    printer, but can't figure out how to do so from the help file I get
    from
    rundll32.printui.dll.PrintUIEntry /?


    Could somebody please propose what the command should look like? This
    is my first ever attempt at scripting printer management. The printer
    is shared as hp812c on a computer called slickswintel that's been
    happily running win98SE for a decade. The Vista 64 home premium
    computer is called gateway since I feared that slicksgateway was too
    long and was why the win98se machine crashed when trying to access the
    gateway shares. Turns out I was wrong, but never changed it back...

      My System SpecsSystem Spec

  2. #2


    Alan Morris [MSFT] Guest

    Re: Using a script to set the default printer at start up after adding it

    use prnmngr.vbs in system32\printing_admin_scripts\en-us to set the default
    printer.

    You can copy this file to system32 so it's in the path.


    --
    Alan Morris
    Windows Printing Team
    Search the Microsoft Knowledge Base here:
    http://support.microsoft.com/search/?adv=1

    This posting is provided "AS IS" with no warranties, and confers no rights.

    "SlickRCBD" <slickrcbdnews@newsgroup> wrote in message
    news:861aa19b-8076-4f97-8304-45999313a51b@newsgroup

    > How do I set the default printer using a batch file? Due to problems
    > with a win98se printer share that ONLY happens with Vista 64 HP, I
    > need to reinstall the printer every time I reboot. With help in
    > previous posts, I have the following technically two-line batch file
    > so far:
    >
    >
    > rundll32 printui.dll,PrintUIEntry /dl /n "hp812c" /c\\GATEWAY
    > rundll32 printui.dll,PrintUIEntry /if /b "HP812c" /c\\GATEWAY /f
    > "%windir%\inf\ntprint.inf" /r "\\Slickswintel\hp812c" /m "HP DeskJet
    > 812C"
    >
    >
    >
    >
    > I need a final line to set the newly created HP812C to be the default
    > printer, but can't figure out how to do so from the help file I get
    > from
    > rundll32.printui.dll.PrintUIEntry /?
    >
    >
    > Could somebody please propose what the command should look like? This
    > is my first ever attempt at scripting printer management. The printer
    > is shared as hp812c on a computer called slickswintel that's been
    > happily running win98SE for a decade. The Vista 64 home premium
    > computer is called gateway since I feared that slicksgateway was too
    > long and was why the win98se machine crashed when trying to access the
    > gateway shares. Turns out I was wrong, but never changed it back...


      My System SpecsSystem Spec

Using a script to set the default printer at start up after adding it problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista - default printer doesn't stay as default Freddie Kang Vista print fax & scan 15 18 Apr 2010
Adding a hotfix from the login script eddie VB Script 2 30 Jul 2009
XP desktop printer networked to VISTA laptop - adding printer error Patrycja Vista print fax & scan 2 10 Jun 2009
Adding Remote Users to AD via Script KDawg44 VB Script 0 19 Aug 2008
Vista keeps stealing default status from default printer computer e.t. Vista networking & sharing 0 21 Aug 2007