Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista print fax & scan

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

Reply
 
Old 4 Weeks Ago   #1 (permalink)
SlickRCBD


 
 

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
Old 3 Weeks Ago   #2 (permalink)
Alan Morris [MSFT]


 
 

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
Quote:

> 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
Reply

Thread Tools


Similar Threads
Thread Forum
Adding a hotfix from the login script VB Script
XP desktop printer networked to VISTA laptop - adding printer error Vista print fax & scan
Adding attributes to Richard Muellers script VB Script
Adding Remote Users to AD via Script VB Script
Vista keeps stealing default status from default printer computer Vista networking & sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46