override
The override command provides the ability to customize certain
commands and add multiple variations to existing commands. This powerful
compound command allows you to create your own custom combination
command similar to the existing commands waitdetached
or runhidden
. To add constraints to an existing
command, you add predefined keyword/value pairs within the body of
the command.
Syntax
override <cmd>
<keyword>=<value>
<keyword>=<value>
<cmd> <rest of command line>
Where cmd is either wait or run, and the keyword/value pairs are chosen from the table shown in the Usage Notes section.
Example
override wait
hidden=true
wait notepad.exe
This example provides the same functionality as waithidden
notepad.exe
.
override wait
completion=job
hidden=true
runas=currentuser
wait __Download\patch.exe arg1 arg2 arg3
This example shows how you might run a patch as a hidden process by the current user, waiting for completion of the job before continuing the Action script.
Usage Notes
The keywords may be specified in any order, but there must be only one per line. White space is not needed around the '=' (equal sign) and is ignored.
Keywords are case-insensitive, and the values can be enclosed in {curly brackets} for Relevance substitution. If duplicate keywords are listed, the last value will be used. The entire command fails if any of the keywords or values are invalid. Platform-specific keywords that are not meaningful on a given platform will be silently ignored. As with most commands, the command string is run through relevance evaluation, so console-side syntax checking is minimal. However, the agent performs full checking at action execution time.
The available keywords and their values are shown in the table below.
keyword | allowable values | default value |
completion | none | process | job | none | process * |
priority | normal | low | normal |
hidden | false | true | false |
detached | false | true | false |
runas | agent | currentuser | agent |
* for run, the default is none, for wait, the default is process. |