Execute (xbrun.exe)

Starts an executable on a remote console.

xbrun [/D[:]path] [/G] [/I] [/O] [/W] [/J] [/X[:]address[+<accesskey>]] command
Option Description
/D[:]pathSpecifies the working directory for the command. If no directory is specified, %SystemRoot% will be used by default.
/GLaunch the process as the GUEST user. By default, processes are launched as the SYSTEM user.
/IRedirect input to the local console. Any text typed in the current console window will be redirected to the remote console.
/ORedirect output to the local console. Any text printed to the remote console window will be redirected to the local console.
/WWait for the remote process to terminate before exiting. If /I and/or /O are specified, /W is implied.
/JLaunch the new process within the tools job object. This only applies to the Title VM. Use this option with care, as the tools job object has very limited reserved memory shared by all processes within the job object, and exceeding the overall limit will kill the job object, all processes within it, and tools connection to the Title VM (until restarted).
/X[:]address[+<accesskey>] Specifies the host name or address (shown as Tools IP on the console) of a targeted console, but does not change the default console. For information about setting a host name for a console, see Setting a Hostname for the Console IP Address.If you do not use this option, the default console (previously set by Connect (xbconnect.exe)) is used.Accesskey is a string that you can use to restrict access to a console to only those people who know the access key. Set the access key by using the command xbconfig accesskey=your-key; then, restart your console to make the access key effective. To access a console that is configured with an access key, you must include a plus sign (+) and the access key after the IP address or host name of the console. For more information about access keys, see xbconfig accesskey.
Note
If an access key is provided when the default console is set by xbconnect, then the access key is stored as part of the address of the default console.
commandSpecifies the command to execute and arguments passed to the executable. The command is the final parameter passed to XBRUN. All additional parameters will be automatically appended to the command and passed to the remote device.
Note
Executables must have the file type specified. For example the net command would have to specified as net.exe.

Remarks

xbrun runs as the Guest user with System privileges in the exclusive partition.

xbrun supports environment variables which are expanded on the remote device. For example, %SystemRoot% will be automatically expanded to the operating system directory of the remote device.

Quotation marks around parameters are automatically removed. If a quotation mark needs to be preserved in the command-line passed to the remote device, precede it with a backslash (").

If the command you specify does not contain a directory path, the system searches for the executable file in the following sequence:

  1. The Windows system directory.
  2. The Windows directory.
  3. The directories that are listed in the PATH environment variable.

xbrun will not automatically search the working directory specified with the /D switch when attempting to load the executable.

Many console applications (including CMD.EXE) read their input directly from the console, not from the standard input pipe. These applications will not support the /I switch. Additionally, any application that writes directly to the console instead of stdout or stderr will not have its output redirected by the /O switch.

Example

xbrun /O /D:%SystemRoot%\System32 CMD.EXE /C ECHO Here's some \"quotes.\"  

See also

Command Line Tools

XTF Transport Errors

Connect (xbconnect.exe)

Application Management (xbapp.exe)