JSI Tip 9390. How can I launch a process to run hidden?


I have scripted RunHidden.vbs to launch a hidden process.

The syntax for using RunHidden.vbs is:

cscript Drive:\FolderX\RunHidden.vbs Drive:\FolderY\Executable_Image.Executable_Extension \[Param1 Parma2 ... ParamN\]

Where:

Drive:\FolderX\RunHidden.vbs is the fully qualified path to RunHidden.vbs.

Drive:\FolderY\Executable_Image.Executable_Extension is the fully qualified path to the executable, like program.exe or MyScript.bat.

ParamX are any number of optional switches / parameters for Drive:\FolderY\Executable_Image.Executable_Extension.
NOTE: You can launch RunHidden.vbs from a CMD.EXE window or from Start / Run.

RunHidden.vbs contains:

dim arg
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objArgs = WScript.Arguments
arg=objArgs(0)
Set objArgs = WScript.Arguments
For I = 1 to objArgs.Count - 1
   arg = arg & " " & objArgs(I)
Next
Return = WshShell.Run(arg, 0, False)
set WshShell = Nothing



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish