waithidden

This command is similar to the runhidden command and uses CreateProcess to execute a command in a hidden window. It hides the window by setting the STARTUPINFO dwFlag to STARTF_USESHOWWINDOW and setting wShowWindow to SW_HIDE. This action waits for the completion of the process before continuing with subsequent action commands.

Syntax

waithidden <command line>

Examples

waithidden "{pathname of regapp "notepad.exe"}"
waithidden "c:\winnt\ftp.exe" ftp.myurl.net
waithidden 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