What are all of the possible session states in windows? (example: Disc, Active, etc.) I haven't been able to find documentation suggesting the possible values, or a standard on what the values could be.
Combining both information from here and here (Query and WTS_CONNECTSTATE_CLASS representation):
- Active (WTSActive) : The session is connected and active. (A user is logged on to the WinStation).
- Conn (WTSConnected) : The session is connected. No user is logged on. (The WinStation is connected to the client).
- ConnQ (WTSConnectQuery) : The session is in the process of connecting. If this state continues, it indicates a problem with the connection. (The WinStation is in the process of connecting to the client).
- Shadow (WTSShadow) : The session is shadowing another session. (The WinStation is shadowing another WinStation).
- Listen (WTSListen) : The session is ready to accept a client connection. (The WinStation is listening for a connection. A listener session waits for requests for new client connections. No user is logged on a listener session. A listener session cannot be reset, shadowed, or changed to a regular client session).
- Disc (WTSDisconnected) : The session is disconnected. (The WinStation is active but the client is disconnected).
- Idle (WTSIdle) : The session is initialized. (The WinStation is waiting for a client to connect).
- Down (WTSDown) : The session is down, indicating the session failed to initialize correctly. (The WinStation is down due to an error).
- Init (WTSInit) : The session is initializing. (The WinStation is initializing).
WTS_CONNECTSTATE_CLASS that you can get from WTSQuerySessionInformation documents these values:
WTSActive,
WTSConnected,
WTSConnectQuery,
WTSShadow,
WTSDisconnected,
WTSIdle,
WTSListen,
WTSReset,
WTSDown,
WTSInit
(WTSActive is 0, WTSConnected is 1 and so on)