2.2.2.3.1 Client Execute PDU (TS_RAIL_ORDER_EXEC)
The Client Execute PDU is sent from a client to a server to request that a remote application launch on the server.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
header |
|||||||||||||||||||||||||||||||
Flags |
ExeOrFileLength |
||||||||||||||||||||||||||||||
WorkingDirLength |
ArgumentsLen |
||||||||||||||||||||||||||||||
ExeOrFile (variable) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
WorkingDir (variable) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
Arguments (variable) |
|||||||||||||||||||||||||||||||
... |
header (4 bytes): A TS_RAIL_PDU_HEADER structure. The orderType field of the header MUST be set to 0x0001 (TS_RAIL_ORDER_EXEC).
Flags (2 bytes): An unsigned 16-bit integer. Specifies a bit field of flags that indicate modifications to the Client Execute PDU fields.
-
0
1
2
3
4
5
6
7
8
91
0
1
2
3
4
5A
B
C
D
E
0
0
0
0
0
0
0
0
0
0
0
-
Where the bits are defined as:
-
Value
Description
A
TS_RAIL_EXEC_FLAG_EXPAND_WORKINGDIRECTORY
The environment variables in the WorkingDir field MUST be expanded on the server.
B
TS_RAIL_EXEC_FLAG_TRANSLATE_FILES
The drive letters in the file path MUST be converted to corresponding mapped drives on the server. This flag MUST NOT be set if the TS_RAIL_EXEC_FLAG_FILE (0x0004) flag is not set.
C
TS_RAIL_EXEC_FLAG_FILE
If this flag is set, the ExeOrFile field refers to a file path. If it is not set, the ExeOrFile field refers to an executable.
D
TS_RAIL_EXEC_FLAG_EXPAND_ARGUMENTS
The environment variables in the Arguments field MUST be expanded on the server.
E
TS_RAIL_EXEC_FLAG_APP_USER_MODEL_ID
If this flag is set, the ExeOrFile field refers to an application user model ID. If it is not set, the ExeOrFile field refers to a file path. This flag MUST be ignored if the TS_RAIL_EXEC_FLAG_FILE (0x0004) flag is set. An application user model ID is a string that uniquely identifies an application, regardless of where the application is installed on the operating system. The string can be used to identify Windows Store applications as well as desktop applications.
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.
WorkingDirLength (2 bytes): An unsigned 16-bit integer. Specifies the length of the WorkingDir field, in bytes. The minimum length is 0, and the maximum length is 520 bytes.
ArgumentsLen (2 bytes): An unsigned 16-bit integer. Specifies the length of the Arguments field, in bytes. The minimum length is 0, and the maximum length is 16,000 bytes.<12>
ExeOrFile (variable): A non-null-terminated string of Unicode characters. Variable length. Specifies the executable, file path, or application user model ID to be launched on the server. This field MUST be present. The maximum length of this field, including file path translations (see TS_RAIL_EXEC_FLAG_TRANSLATE_FILES mask of Flags field), is 520 bytes.
WorkingDir (variable): Optional non-null-terminated string of Unicode characters. Variable length. Specifies the working directory of the launched ExeOrFile field. If the WorkingDirLength field is 0, this field MUST NOT be present; otherwise, it MUST be present. The maximum length of this field, including expanded environment variables (see TS_RAIL_EXEC_FLAG_EXPAND_WORKINGDIRECTORY mask of Flags field), is 520 bytes.
Arguments (variable): Optional non-null-terminated string of Unicode characters. Variable length. Specifies the arguments to the ExeOrFile field. If the ArgumentsLen field is 0, this field MUST NOT be present; otherwise, it MUST be present. The maximum length of this field, including expanded environment variables (see TS_RAIL_EXEC_FLAG_EXPAND_ARGUMENTS mask of Flags field), is 16,000 bytes.