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.

This command waits for the completion of the process before continuing with subsequent action commands.

Version Platforms
8.0.584.0 Windows


waithidden <command-line>


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.

waithidden "{pathname of regapp "notepad.exe"}"
waithidden "c:\winnt\ftp.exe" ftp.myurl.net
waithidden wscript /e:vbs x.vbs arg1 arg2


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>.

The waithidden command has override keywords. See the override documentation for details.