Skip to content

Instantly share code, notes, and snippets.

@xiongjia
Last active September 14, 2017 07:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiongjia/242ed2447d3335afe8f8 to your computer and use it in GitHub Desktop.
Save xiongjia/242ed2447d3335afe8f8 to your computer and use it in GitHub Desktop.
This .VBS is created for launch a console application without Window #devsample #win
' This .VBS is created for launch a console application without Window
' Executing Options
Const HIDDEN_WINDOW = 0
Const NORMAL_WINDOW = 1
Const MINIMIZED_WINDOW = 2
Const MAXIMIZE_WINDOW = 3
' Executing arguments.
' Replace the "ping" to the .bat/.cmd files
' (e.g: "cmd /c ""my-batfile.cmd"" " )
DIM args : args = "cmd /c ""ping -t 127.0.0.1"" "
' A recommendation as to how the application
' window should be displayed initially.
DIM showWindow : showWindow = false
' To Lauch it
DIM shObj : SET shObj = CreateObject("Wscript.Shell")
shObj.Run args, HIDDEN_WINDOW, showWindow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment