Skip to content

Instantly share code, notes, and snippets.

@alvin2ye
Created September 24, 2011 01:30
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 alvin2ye/1238823 to your computer and use it in GitHub Desktop.
Save alvin2ye/1238823 to your computer and use it in GitHub Desktop.
hidden run a bat on windows, can found it later
tasklist /FI "WINDOWTITLE eq ABC" /V /FO
pause
title ABC
ping 127.0.0.1 -n 1000
Dim oShell
bVisible = 0
' one line of code follows
sCmd = """C:\run.bat"""
' end of single line of code
bWaitOnReturn = True
Set oShell = CreateObject ("WScript.Shell")
oShell.run sCmd, bVisible, bWaitOnReturn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment