2.2.2.3.2 Server Execute Result PDU (TS_RAIL_ORDER_EXEC_RESULT)

The Server Execute Result PDU is sent from server to client in response to a Client Execute PDU request, and contains the result of the server's attempt to launch the requested executable.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

header

Flags

ExecResult

RawResult

Padding

ExeOrFileLength

ExeOrFile (variable)

...

header (4 bytes): A TS_RAIL_PDU_HEADER structure. The orderType field of the header MUST be set to TS_RAIL_ORDER_EXEC_RESULT (0x0080).

Flags (2 bytes): An unsigned 16-bit integer. Identical to the Flags field of the Client Execute PDU. The server sets this field to enable the client to match the Client Execute PDU with the Server Execute Result PDU.

ExecResult (2 bytes): An unsigned 16-bit integer. The result of the Client Execute PDU. This field MUST be set to one of the following values.

Value

Meaning

RAIL_EXEC_S_OK

0x0000

The Client Execute request was successful and the requested application or file has been launched.

RAIL_EXEC_E_HOOK_NOT_LOADED

0x0001

The Client Execute request could not be satisfied because the server is not monitoring the current input desktop.

RAIL_EXEC_E_DECODE_FAILED

0x0002

The Execute request could not be satisfied because the request PDU was malformed.

RAIL_EXEC_E_NOT_IN_ALLOWLIST

0x0003

The Client Execute request could not be satisfied because the requested application was blocked by policy from being launched on the server.

RAIL_EXEC_E_FILE_NOT_FOUND

0x0005

The Client Execute request could not be satisfied because the application or file path could not be found.

RAIL_EXEC_E_FAIL

0x0006

The Client Execute request could not be satisfied because an unspecified error occurred on the server.

RAIL_EXEC_E_SESSION_LOCKED

0x0007

The Client Execute request could not be satisfied because the remote session is locked.

RawResult (4 bytes): An unsigned 32-bit integer. Contains an operating system-specific return code for the result of the Client Execute request.<13>

Padding (2 bytes): An unsigned 16-bit integer. Not used.

ExeOrFileLength (2 bytes): An unsigned 16-bit integer. Specifies the length of the ExeOrFile field in bytes. The length MUST be nonzero. The maximum length is 520 bytes.

ExeOrFile (variable): The executable or file that was attempted to be launched. This field is copied from the ExeOrFile field of the Client Execute PDU. The server sets this field to enable the client to match the Client Execute PDU with the Server Execute Result PDU.