Run#

Runs a specified executable or file.

Required Parameters#


Paramater

Description

Type

exe

Specifies the executable filename, and can optionally include the full path.

string

Optional Parameters#


Paramater

Description

Type

Default

path

Specifies the directory for the specified executable.

string

None

args

Specifies the command-line arguments for the process.

string

None

baseDir

Creates the process with the amelioration directory as its working directory.

bool

false

exeDir

Creates the process with the Playbook executables folder as its working directory.

bool

false

runas

Specifies what user the process should be run as.

Enum:
currentUser
currentUserElevated
system
trustedInstaller

trustedInstaller

timeout

Specifies a timeout for the process, where it will kill the process and report an error if the timeout is reached.

integer

None

wait

Specifies whether or not to wait for the process to exit.

bool

true

showOutput

Specifies whether or not to forward the StandardOutput of the executed process to the output log.

bool

true

showError

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}