use prnmngr.vbs in system32\printing_admin_scripts\en-us to set the default
You can copy this file to system32 so it's in the path.
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
> 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
> 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
> 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...