2.3.2 TSProperty
Following is the format of each TSProperty structure:
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NameLength |
ValueLength |
||||||||||||||||||||||||||||||
Type |
PropName (variable) |
||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
PropValue (variable) |
|||||||||||||||||||||||||||||||
... |
NameLength (2 bytes): A 2-byte unsigned integer indicating the length of the PropName field in bytes.
ValueLength (2 bytes): A 2-byte unsigned integer indicating the length of the PropValue field in bytes.
Type (2 bytes): A 2-byte unsigned integer indicating the type of the PropValue field. It can have the following values:
-
Value
Meaning
PROP_TYPE_ITEM
0x01
Indicates that the property contains one item.
PropName (variable): A Unicode string whose length is indicated by the NameLength field. The string indicates the name of the property.
PropValue (variable): An encoded binary BLOB of length indicated by the ValueLength field. This field either contains a 32-bit unsigned integer or an array of ASCII characters. See Encoding and decoding PropValue field for encoding and decoding this BLOB.
-
The following table describes various PropName fields and associated PropValue fields used by Terminal Services.
-
PropName
PropValue type
Description
[MS-TSTS] RPC call that can be used to query this value
CtxCfgPresent
32-bit unsigned integer
It indicates presence of valid TSProperty structures in TSPropertyArray. If the TSPropertyArray does not contain a TSProperty structure containing this PropName and PropValue, Terminal Services ignore the remaining contents of TSPropertyArray. The PropValue field can only contain value 0xB00B1E55.
None.
CtxCfgFlags1
32-bit unsigned integer
Each bit in the PropValue maps to a Boolean field of the USERCONFIG structure returned by the RpcGetConfigData method. For details about each bit, see the table of CtxCfgFlags1 values in this section.
RpcGetConfigData.
CtxCallBack
32-bit unsigned integer
The callback class for callback operations.
Returned by RpcGetConfigData method in Callback field of USERCONFIG structure.
CtxKeyboardLayout
32-bit unsigned integer
The keyboard layout (HKL) of the user session.
Returned by the RpcGetConfigData method in the KeyboardLayout field of the USERCONFIG structure.
CtxMinEncryptionLevel
8-bit integer
The minimum allowed encryption level of the user session.
Returned by the RpcGetConfigData method in the MinEncryptionLevel field of the USERCONFIG structure.
CtxNWLogonServer
32-bit unsigned integer
The NetWare logon server name.
Returned by the RpcGetConfigData method in the NWLogonServer field of the USERCONFIG structure.
CtxWFHomeDir
Variable-length ASCII character array
This attribute specifies the home directory for the user. Each user on a terminal server has a unique home directory. This ensures that application information is stored separately for each user in a multi-user environment. To set a home directory on the local computer, the implementer specifies a local path; for example, C:\Path. To set a home directory in a network environment, the implementer MUST first set the CtxWFHomeDirDrive property, and then set this property to a Universal Naming Convention (UNC) path.
Returned by the RpcGetConfigData method in the WFHomeDir field of the USERCONFIG structure.
CtxWFHomeDirDrive
Variable-length ASCII character array
This attribute specifies a home drive for the user. In a network environment, this property is a string containing a drive specification (a drive letter followed by a colon) to which the UNC path specified in the TerminalServicesCtxWFHomeDir property is mapped. To set a home directory in a network environment, the implementer MUST first set this property, and then set the CtxWFHomeDir property.
Returned by the RpcGetConfigData method in the WFHomeDirDrive field of the USERCONFIG structure.
CtxInitialProgram
Variable-length ASCII character array
This attribute specifies the path and file name of the application that the user requires to start automatically when the user logs on to the terminal server. To set an initial application to start when the user logs on, the implementer MUST first set this property, and then set the CtxWorkDirectory property. If the implementer sets only the CtxInitialProgram property, the application starts in the user's session in the default user directory.
Returned by the RpcGetConfigData method in the InitialProgram field of the USERCONFIG structure.
CtxMaxConnectionTime
32-bit unsigned integer
This attribute specifies the maximum duration (in minutes) of the Terminal Services session. After the specified number of minutes has elapsed, the session can be disconnected or terminated.
Returned by the RpcGetConfigData method in the MaxConnectionTime field of the USERCONFIG structure.
CtxMaxDisconnectionTime
32-bit unsigned integer
This attribute specifies the maximum amount of time (in minutes) that a disconnected Terminal Services session remains active on the terminal server. After the specified number of minutes has elapsed, the session is terminated.
Returned by the RpcGetConfigData method in the MaxDisconnectionTime field of the USERCONFIG structure.
CtxMaxIdleTime
32-bit unsigned integer
This attribute specifies the maximum amount of time (in minutes) that the Terminal Services session can remain idle. After the specified number of minutes has elapsed, the session can be disconnected or terminated.
Returned by the RpcGetConfigData method in the MaxIdleTime field of the USERCONFIG structure.
CtxWFProfilePath
Variable-length ASCII character array
This attribute specifies a roaming or mandatory profile path to use when the user logs on to the terminal server. The profile path is in the following network path format: \\servername\profiles folder name\username.
Returned by the RpcGetConfigData method in the WFProfilePath field of the USERCONFIG structure.
CtxShadow
32-bit unsigned integer
This attribute specifies whether to allow remote observation or remote control of the user's Terminal Services session. The values are as follows:
0. Disable
1. EnableInputNotify
2. EnableInputNoNotify
3. EnableNoInputNotify
4. EnableNoInputNoNotify
For a description of these values, see [MSDN-RCMWin32_TSRCS].
Returned by the RpcGetConfigData method in the Shadow field of the USERCONFIG structure.
CtxWorkDirectory
Variable-length ASCII character array
This attribute specifies the working directory path for the user. To set an initial application to start when the user logs on to the terminal server, the implementer MUST first set the CtxInitialProgram property, and then set this property.
Returned by the RpcGetConfigData method in the WorkDirectory field of the USERCONFIG structure.
CtxCallbackNumber
Variable-length ASCII character array
This attribute specifies the call back number provided to the user on the client side for technical support.
Returned by the RpcGetConfigData method in the CallbackNumber field of the USERCONFIG structure.
-
The following table provides the details of each bit in the PropValue associated with the PropName 'CtxCfgFlags1'.
-
Bit mask in CtxCfgFlags1 PropValue
[MS-TSTS] RPC call that can be used to query this value
0x10000000
Returned by the RpcGetConfigData method in fInheritInitialProgram field of the USERCONFIG structure.
F1MSK_INHERITCALLBACK
0x08000000
Returned by the RpcGetConfigData method in the fInheritCallback field of the USERCONFIG structure.
F1MSK_INHERITCALLBACKNUMBER
0x04000000
Returned by the RpcGetConfigData method in the fInheritCallbackNumber field of the USERCONFIG structure.
F1MSK_INHERITSHADOW
0x02000000
Returned by the RpcGetConfigData method in the fInheritShadow field of the USERCONFIG structure.
F1MSK_INHERITMAXSESSIONTIME
0x01000000
Returned by the RpcGetConfigData method in the fInheritMaxSessionTime field of the USERCONFIG structure.
F1MSK_INHERITMAXDISCONNECTIONTIME
0x00800000
Returned by the RpcGetConfigData method in the fInheritMaxDisconnectionTime field the USERCONFIG structure.
F1MSK_INHERITMAXIDLETIME
0x00400000
Returned by the RpcGetConfigData method in the fInheritMaxIdleTime field of the USERCONFIG structure.
F1MSK_INHERITAUTOCLIENT
0x00200000
Returned by the RpcGetConfigData method in the fInheritAutoClient field of the USERCONFIG structure.
F1MSK_INHERITSECURITY
0x00100000
Returned by the RpcGetConfigData method in the fInheritSecurity field of the USERCONFIG structure.
F1MSK_PROMPTFORPASSWORD
0x00080000
Returned by the RpcGetConfigData method in the fPromptForPassword field of the USERCONFIG structure.
F1MSK_RESETBROKEN
0x00040000
Returned by the RpcGetConfigData method in the fResetBroken field of the USERCONFIG structure.
F1MSK_RECONNECTSAME
0x00020000
Returned by the RpcGetConfigData method in the fReconnectSame field of the USERCONFIG structure.
F1MSK_LOGONDISABLED
0x00010000
Returned by the RpcGetConfigData method in the fLogonDisabled field of the USERCONFIG structure.
F1MSK_AUTOCLIENTDRIVES
0x00008000
Returned by the RpcGetConfigData method in the fAutoClientDrives field of the USERCONFIG structure.
F1MSK_AUTOCLIENTLPTS
0x00004000
Returned by the RpcGetConfigData method in the fAutoClientLpts field of the USERCONFIG structure.
F1MSK_FORCECLIENTLPTDEF
0x00002000
Returned by the RpcGetConfigData method in the fForceClientLptDef field of the USERCONFIG structure.
F1MSK_DISABLEENCRYPTION
0x00001000
Returned by the RpcGetConfigData method in the fDisableEncryption field of the USERCONFIG structure.
F1MSK_HOMEDIRECTORYMAPROOT
0x00000800
Returned by the RpcGetConfigData method in the fHomeDirectoryMapRoot field of the USERCONFIG structure.
F1MSK_USEDEFAULTGINA
0x00000400
Returned by the RpcGetConfigData method in the fUseDefaultGina field of the USERCONFIG structure.
F1MSK_DISABLECPM
0x00000200
Returned by the RpcGetConfigData method in the fDisableCpm field of the USERCONFIG structure.
F1MSK_DISABLECDM
0x00000100
Returned by the RpcGetConfigData method in the fDisableCdm field of the USERCONFIG structure.
F1MSK_DISABLECCM
0x00000080
Returned by the RpcGetConfigData method in the fDisableCcm field of the USERCONFIG structure.
F1MSK_DISABLELPT
0x00000040
Returned by the RpcGetConfigData method in the fDisableLPT field of the USERCONFIG structure.
F1MSK_DISABLECLIP
0x00000020
Returned by the RpcGetConfigData method in the fDisableClip field of the USERCONFIG structure.
F1MSK_DISABLEEXE
0x00000010
Returned by the RpcGetConfigData method in the fDisableExe field of the USERCONFIG structure.
F1MSK_WALLPAPERDISABLED
0x00000008
Returned by the RpcGetConfigData method in the fWallPaperDisabled field of the USERCONFIG structure.
F1MSK_DISABLECAM
0x00000004
Returned by the RpcGetConfigData method in the fDisableCam field of the USERCONFIG structure.