[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\fSingleSessionPerUser 为 1. 启用一个用户只能有一个session的限制。
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
For a specific terminal server session, USERCONFIG indicates the user and session configuration.
-
typedef struct _USERCONFIG {
ULONG fInheritAutoLogon :1;
ULONG fInheritResetBroken :1;
ULONG fInheritReconnectSame :1;
ULONG fInheritInitialProgram :1;
ULONG fInheritCallback :1;
ULONG fInheritCallbackNumber :1;
ULONG fInheritShadow :1;
ULONG fInheritMaxSessionTime :1;
ULONG fInheritMaxDisconnectionTime :1;
ULONG fInheritMaxIdleTime :1;
ULONG fInheritAutoClient :1;
ULONG fInheritSecurity :1;
ULONG fPromptForPassword :1;
ULONG fResetBroken :1;
ULONG fReconnectSame :1;
ULONG fLogonDisabled :1;
ULONG fWallPaperDisabled :1;
ULONG fAutoClientDrives :1;
ULONG fAutoClientLpts :1;
ULONG fForceClientLptDef :1;
ULONG fRequireEncryption :1;
ULONG fDisableEncryption :1;
ULONG fUnused1 :1;
ULONG fHomeDirectoryMapRoot :1;
ULONG fUseDefaultGina :1;
ULONG fCursorBlinkDisabled :1;
ULONG fPublishedApp :1;
ULONG fHideTitleBar :1;
ULONG fMaximize :1;
ULONG fDisableCpm :1;
ULONG fDisableCdm :1;
ULONG fDisableCcm :1;
ULONG fDisableLPT :1;
ULONG fDisableClip :1;
ULONG fDisableExe :1;
ULONG fDisableCam :1;
ULONG fDisableAutoReconnect :1;
ULONG ColorDepth :3;
ULONG fInheritColorDepth :1;
ULONG fErrorInvalidProfile :1;
ULONG fPasswordIsScPin :1;
ULONG fDisablePNPRedir :1;
WCHAR UserName[USERNAME_LENGTH + 1];
WCHAR Domain[DOMAIN_LENGTH + 1];
WCHAR Password[PASSWORD_LENGTH + 1];
WCHAR WorkDirectory[DIRECTORY_LENGTH + 1];
WCHAR InitialProgram[INITIALPROGRAM_LENGTH + 1];
WCHAR CallbackNumber[CALLBACK_LENGTH + 1];
CALLBACKCLASS Callback;
SHADOWCLASS Shadow;
ULONG MaxConnectionTime;
ULONG MaxDisconnectionTime;
ULONG MaxIdleTime;
ULONG KeyboardLayout;
BYTE MinEncryptionLevel;
WCHAR NWLogonServer[NASIFILESERVER_LENGTH + 1];
APPLICATIONNAME PublishedName;
WCHAR WFProfilePath[DIRECTORY_LENGTH + 1];
WCHAR WFHomeDir[DIRECTORY_LENGTH + 1];
WCHAR WFHomeDirDrive[4];
} USERCONFIG,
*PUSERCONFIG;
fInheritAutoLogon: The prompt for the password setting. TRUE indicates the use of client-specified autologon settings, FALSE specifies the use of machine autologon settings.
fInheritResetBroken: Reset the session when the connection is broken. TRUE indicates the value to use for fResetBroken from the user properties if the machine/user policy is not set, FALSE otherwise.
fInheritReconnectSame: Reconnect from the same client setting. TRUE indicates the value to use for fReconnectSame from the user properties if the machine/user policy is not set, FALSE otherwise.
fInheritInitialProgram: The initial program setting. TRUE indicates the value to use for InitialProgram from the user properties if the machine/user policy is not set, FALSE otherwise.
fInheritCallback: The callback setting. TRUE indicates the value to use for Callback from the user properties if the machine/user policy is not set, FALSE otherwise.<63>
fInheritCallbackNumber: The callback number setting. TRUE indicates the value to use for CallbackNumber from the user properties if the machine/user policy is not set, FALSE otherwise.<64>
fInheritShadow: The shadow setting. TRUE indicates the value to use for Shadow from the user properties if the machine/user policy is not set, FALSE otherwise.
fInheritMaxSessionTime: The maximum allowed session connection time setting. TRUE indicates the value to use for MaxSessionTime from the user properties if the machine/user policy is not set, FALSE otherwise.
fInheritMaxDisconnectionTime: The maximum allowed session disconnect time setting. TRUE indicates the value to use for MaxDisconnectionTime from the user properties if the machine/user policy is not set, FALSE otherwise.
fInheritMaxIdleTime: The maximum allowed session idle time. TRUE indicates the value to use for MaxIdleTime from the user properties if the machine/user policy is not set, FALSE otherwise.
fInheritAutoClient: The auto client setting. TRUE indicates the value to use for fAutoClientDrivers and fAutoClientLpts from the user properties if the machine/user policy is not set, FALSE otherwise.
fInheritSecurity: Inherit security setting. TRUE indicates the use of security settings from the user properties if the machine/user policy is not set, FALSE otherwise.
fPromptForPassword: Set to TRUE to ignore the credential sent from the client and always prompt for a password, FALSE otherwise.
fResetBroken: Set to TRUE to log off the session when the idle timers for the session expire. Otherwise, the session will be disconnected when the timer expires.
fReconnectSame: FALSE indicates that the user can reconnect from any client computer to a disconnected session.
-
TRUE indicates that the user must reconnect to a disconnected session from the same client computer that initially established the disconnected session. Logging on from a different client computer will lead to a new terminal server session being created.
fLogonDisabled: TRUE indicates that a user cannot log on to a session remotely, FALSE otherwise.<65>
fWallPaperDisabled: TRUE indicates display of the desktop wallpaper in the session has been disabled, FALSE otherwise.
fAutoClientDrives: TRUE specifies to automatically redirect local drives on the client so they are accessible to the user in the remote terminal server session, FALSE otherwise.
fAutoClientLpts: TRUE specifies to automatically redirect printers on the client so they are accessible to the user in the remote terminal server session, FALSE otherwise.
fForceClientLptDef: TRUE indicates to force the client's redirected printer to be the default printer for the user, FALSE otherwise.
fRequireEncryption: TRUE indicates the connection must be encrypted, FALSE otherwise.
fDisableEncryption: TRUE indicates the connection does not need encryption, FALSE otherwise.
fUnused1: Not used.
fHomeDirectoryMapRoot: Not used.
fUseDefaultGina: TRUE indicates to override a third-party GINA so that only the default GINA is used for the terminal server session, FALSE otherwise.<66>
fCursorBlinkDisabled: TRUE indicates disable the blinking of the mouse cursor, FALSE otherwise.<67>
fPublishedApp: Not used.
fHideTitleBar: Not used.
fMaximize: Not used.
fDisableCpm: TRUE indicates disable client printer redirection, FALSE otherwise.
fDisableCdm: TRUE indicates disable client drive redirection, FALSE otherwise.
fDisableCcm: TRUE indicates disable client COM port redirection, FALSE otherwise.
fDisableLPT: TRUE indicates disable client printer (LPT) port redirection, FALSE otherwise.
fDisableClip: TRUE indicates disable client clipboard redirection, FALSE otherwise.
fDisableExe: TRUE indicates disable .exe file execution, FALSE otherwise.
fDisableCam: TRUE indicates disable client audio redirection, FALSE otherwise.
fDisableAutoReconnect: TRUE indicates disable auto-reconnect functionality, FALSE otherwise.<68>
ColorDepth: The color depth of the session.<69>
fInheritColorDepth: Set to TRUE to inherit color depth from the user or client configuration, FALSE otherwise.<70>
fErrorInvalidProfile: Set to TRUE if WFProfilePath, WFHomeDir, or WFHomeDirDrive is invalid (too long), FALSE otherwise.<71>
fPasswordIsScPin: Set to TRUE if the password field contains a smart card PIN.<72>
fDisablePNPRedir: Set to TRUE if Plug and Play (PnP) redirection is disabled, FALSE otherwise.
UserName: The user name used in autologon scenarios.
Domain: The domain name used in autologon scenarios.
Password: The password used in autologon scenarios.
WorkDirectory: The work directory for the initial program.
InitialProgram: The program to run instead of the default.<73>
CallbackNumber: The telephone number that will be returned by the Terminal Services server to the client when the server is unable to complete the connection request from the client. The user on the client side can use this number to call back for technical support.<74>
Callback: The callback class for callback operations.<75>
Shadow: The shadow setting of the session.
MaxConnectionTime: The maximum allowed session connection time setting of the session in milliseconds. The session will disconnect/logoff once the limit is reached.
MaxDisconnectionTime: The maximum allowed session disconnect time of the session in milliseconds(千分之一秒). The session will logoff once the limit is reached.
MaxIdleTime: The maximum allowed session idle time setting of the session in milliseconds. The session will disconnect/logoff once the limit is reached.(10分钟)
KeyboardLayout: The keyboard layout (HKL) of the session.
MinEncryptionLevel: The minimum allowed encryption level. Possible numeric values for this parameter include 1 (Low), 2 (Client Compatible), 3 (High), and 4 (FIPS). Detailed description of these encryption levels is included in [MS-RDPBCGR] sections 5.3.1 and 5.4.1.
NWLogonServer: The NetWare logon server name.<76>
PublishedName: Not used.
WFProfilePath: The terminal server profile path. Overrides the standard profile path.
WFHomeDir: The terminal server home directory path. Overrides the standard home directory.
WFHomeDirDrive: The terminal server home directory drive. Overrides the standard home directory.