XenoGuard Documentation

Run Shell Command

Actions » Windows » Operating System » General » Run Shell Command 

The action Run Shell Command executes Win32 console commands to automate routine tasks done in a Windows environment.

[-] Hide
  1. Open the Windows node in the Workspace Explorer.
  2. Open the Operating System node.
  3. In the General node, select the Run Shell Command action.


The action has the following input parameters:

name Description
The shell command to be executed with Windows command line interpreter 'cmd.exe'.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
Wait For Exit
Determines if the action should wait until the command has been executed.

Allowed Context Scope
Allowed Value [Boolean]

Information Setting the Boolean value to "True" for the Wait For Exit parameter displays the result in Output of the Result List.


The action returns the following results:

The output of the command line interpreter.

Parameter of the "Line" sub-branch:

  • Line - a single output line of the command line interpreter
Allowed Context Scope [Fixed]
Allowed Context Types [Variable, Parameter]
The process handle of the command line interpreter.

Allowed Context Scope [Fixed]
Allowed Context Types [Variable, Parameter]
Exit Code
A numeric value as exit code of the executed command.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter]

Warning Editing the registry may severely damage your system if done incorrectly. To avoid data loss on the computer when making changes to the registry, make sure to back up any important data on the computer.

Example 1 (Run the traceroute command for a URL):

This example creates two local variables, ShellCommand and URL with Text, as data type. The variables are then concatenated to create the shell command and execute the "tracert" command. A notice is then output when the traceroute is complete in Speech Output.

Example 2 (Search a string in a text file with a shell command):

This example creates two local variables, ShellCommand and StringValue, with Text as data type. If the specified text file exists in a directory, the "findstr" inline command is created by concatenating the value of the variables and the path name of the text file. Then, the result of the string search within the text file is displayed in Message Box.

See other OS General operations:

Get Environment Information
Empty Recycle Bin
Lock Screen
System Shutdown