Set a default printer from VB script

Create a .vbs file (name it DefaultPrinterChanger.vbs or something else) and change the default printer name to the name of the default printer you need.

Set WSHNetwork = CreateObject("WScript.Network")
WSHNetwork.SetDefaultPrinter "HP Printer"

You can also call this script from a batch script; for example:

TITLE Change default printer
Cscript C:\voorbeeld\DefaultPrinterChanger.vbs


Author Bio

Thank you for your interest in my blog! On this miniblog, I write mostly short (technical) blog posts that might interest other people. Read more about me or feel free to contact me.


Leave a Reply

Your email address will not be published. Required fields are marked *