Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Query session states

Tags:

windows

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.

like image 877
Preston Martin Avatar asked Oct 14 '25 03:10

Preston Martin


2 Answers

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).
like image 154
Андрей Дяченко Avatar answered Oct 19 '25 18:10

Андрей Дяченко


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)

like image 24
Anders Avatar answered Oct 19 '25 17:10

Anders



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!