Run#
Runs a specified executable or file.
Required Parameters#
Paramater |
Description |
Type |
---|---|---|
|
Specifies the executable filename, and can optionally include the full path. |
string |
Optional Parameters#
Paramater |
Description |
Type |
Default |
---|---|---|---|
|
Specifies the directory for the specified executable. |
string |
None |
|
Specifies the command-line arguments for the process. |
string |
None |
|
Creates the process with the amelioration directory as its working directory. |
bool |
false |
|
Creates the process with the Playbook executables folder as its working directory. |
bool |
false |
|
Specifies what user the process should be run as. |
Enum:
|
|
|
Specifies a timeout for the process, where it will kill the process and report an error if the timeout is reached. |
integer |
None |
|
Specifies whether or not to wait for the process to exit. |
bool |
true |
|
Allows control over how specified exit codes should be handled.
|
dictionary |
None |
|
Specifies whether or not to forward the StandardOutput of the executed process to the output log. |
bool |
true |
|
Specifies whether or not to forward the StandardError of the executed process to the output log. |
bool |
true |
Examples#
- !run:
exe: 'DISM'
args: '/Online /Disable-Feature /FeatureName:"SmbDirect" /NoRestart'
weight: 30
- !run: {exe: 'EXAMPLE.bat', exeDir: true}
- !run: {exe: 'winget', args: "install M2Team.NanaZip", runas: currentUserElevated}