Run

Verb: openFile

Runs a file, folder or URL, returning the process ID.

Syntax

openFile --file(String) [--args(String)] [--invisible(Boolean)] (Numeric)=value

Inputs

Script Designer Required AcceptedTypes Description
--file Path Required Text Path to the file, folder, or URL that should be run.
--args Parameters Optional Text Initialization parameters, based on the file, folder or open URL, such as safe mode, window mode, etc.
--invisible Hide Window Optional Boolean When enabled, starts running the file in the background.

Outputs

Script Designer AcceptedTypes Description
value Process ID Number ID of the process that was started.

Example

The Run command runs the Notepad and returns the process ID.

defVar --name processId --type Numeric
// Run the notepad.
openFile --file "notepad.exe" processId=value
logMessage --message "${processId}" --type "Info"
// Displays the process ID in the console.

See Also

  • Check If Virtual Machine
  • Count Monitors
  • Get Display Devices
  • Get Screen Resolution
  • Get System Folder Path
  • Lock the Machine
  • Logoff
  • Set Screen Resolution
  • Shutdown