SUB shell(cmd) ' run command as if you ran it from the command line dim objShell set objShell = Wscript.CreateObject("WScript.Shell") objShell.Run(cmd) set objShell=nothing end sub Wscript.sleep(16000) shell "ASAP" ' check Autoconnect at startup in ASAP Wscript.sleep(16000) WScript.CreateObject("WScript.Shell").Run("rundll32 user32.dll,LockWorkStation")