Help 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 Home Problem (XP works fine, even when I use a virtual machine with Vista as the host), I need to delete the printer and re-add it every time I reboot or the printer will be considered "offline" with now ay to get it "online" so I can print. With help in previous posts on Usenet, 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? Ideally something that I can copy from the web browser and paste into the batch file. 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 and sharing with XP since around 2004. The Vista 64 home premium computer is called Gateway since I feared that slicksgateway was too long (13 chars, I recall a 12 max somewhere) and was why the win98se machine crashed when trying to access the gateway shares. Turns out I was wrong, but never changed it back. I also belatedly realized that it was probably a bad name since other techs might mistake it for the default gateway. Then again, it might be good to confuse a hacker. Also, if there is a way to set it to print in black & white by default in the script, I'd appreciate an example of how to set that up as well.
September 25th, 2010 11:45pm

I think that "The official Scripting Guys!" Forum is the most appropriate forum for your question. http://social.technet.microsoft.com/Forums/en-US/ITCG/threads This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
September 26th, 2010 1:43am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics