Skip to content

Instantly share code, notes, and snippets.

@Depicus
Created February 18, 2015 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Depicus/ca52e144f0f0693ffc46 to your computer and use it in GitHub Desktop.
Save Depicus/ca52e144f0f0693ffc46 to your computer and use it in GitHub Desktop.
Option Explicit
Dim Args, TheUser, TheNewValue
Set Args = Wscript.Arguments
Set TheUser = GetObject(Args(0))
TheNewValue = InputBox("Old Default Printer: " & TheUser.defaultPrinter & vbCRLF & vbCRLF& vbCRLF& vbCRLF & "New Default Printer","Domain Default Printer",TheUser.defaultPrinter)
if TheNewValue <> "" then TheUser.Put "defaultPrinter",TheNewValue
TheUser.SetInfo
Set TheUser = Nothing
WScript.Quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment