runhidden

This command uses CreateProcess() to launch a command in a hidden window. It hides the window by setting the STARTUPINFO dwFlag to STARTF_USESHOWWINDOW and setting wShowWindow to SW_HIDE. The process that is created may modify that flag to subsequently show the window again.

After launching, the following action command line is immediately executed. To wait for the launch to complete before continuing the action, use the waithidden command.

Syntax

runhidden <command line>

Examples

runhidden "{pathname of regapp "wordpad.exe"}"
runhidden "c:\winnt\ftp.exe" ftp.mycorp.net
runhidden wscript /e:vbs x.vbs arg1 arg2

These examples show how you might run a script in a hidden window and pass it some arguments. Quotes around the command line are recommended, and necessary if there are spaces in the file names.

Notes

This command is Windows-only. It will cause an action script to terminate on a Unix agent.

If the launched process requires user input, it will wait for it with its window hidden, unless the command explicitly shows its window.

On a Windows computer, this command has the same effect as calling the CreateProcess() API with <command line> and setting the flags to hide the window. See the Windows documentation on CreateProcess() for a discussion of the method used to locate the executable from a <command line>.

Version 6.0 and above -- Windows Only