runhidden

This command uses CreateProcess to launch a command in a hidden window. It hides the window by setting the STARTUPINFO dwFlags 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.

Warning: Do not launch long run programs directly from the __Download folder using any of these commands: run, rundetached, runhidden, override with completion=none, or override with timeout, disposition=abandon. Instead, add an action to copy the programs to a location different from the __Download folder and launch the programs from there.

Version Platforms
8.0.584.0 Windows

Syntax

runhidden <command-line>

Examples

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.

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

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 function with <command-line>. This is also the same as using <command-line> in the Windows Run dialog.

See the Windows documentation on CreateProcess for a discussion of the method used to locate the executable from a <command-line>.