Navigation

7/26/2016

set default printer via command line

Via vb script you can install and set default printer. 
Need to place the script in the startup directory, so that it will get run for every user:


'Put this in   C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\ 

Set WshNetwork = CreateObject ("WScript.Network")
WshNetwork.AddwindowsPrinterConnection "\\testsrva\print_queue_name"
WshNetwork.SetDefaultPrinter "\\testsrva\print_queue_name"

'  Wscript.Echo "end"
'  end of script




Looked at "ntprint /setdefault name=<printer name>"  but was not as reliable




From eHow

No comments:

Post a Comment