Skip to content

Instantly share code, notes, and snippets.

@daephx
Last active November 12, 2022 14:13
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 daephx/78f5bd921e2efe68ce4b6c52aacfe39f to your computer and use it in GitHub Desktop.
Save daephx/78f5bd921e2efe68ce4b6c52aacfe39f to your computer and use it in GitHub Desktop.
[VBScript Examples] #Examples
Set WshShell = CreateObject("WScript.Shell")
FilePath = WshShell.CurrentDirectory & "\script.bat"
WshShell.Run chr(34) & FilePath & Chr(34), 0
Set WshShell = Nothing
Set objShell = CreateObject("Wscript.shell")
objShell.run("powershell -Executionpolicy Bypass -noprofile -noninteractive -file .\script.ps1 -parameter Example")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment