Türkçe versiyon için, lütfen README.tr.md'e bakın.
Windows Session Manager is a Windows Service application developed in C#. This application automatically closes user sessions that have been disconnected and have exceeded a specified duration (default is 60 minutes) using a background timer.
- Automatic Session Closure: Closes user sessions that have been disconnected and have exceeded 60 minutes.
- Whitelist Support: Provides a whitelist feature to prevent specific users from being closed.
- Easy Configuration: Configure session timeout and whitelist settings easily via the
app.configfile.
- .NET Framework (4.7.2)
-
Download or Clone the Project:
git clone https://github.com/kemalincekara/WindowsSessionManager.git
-
Open the Project:
Open the project using Visual Studio 2022.
-
Build the Project:
In Visual Studio 2022, go to Build > Build Solution (or press Ctrl+Shift+B) to compile the project.
-
Service Installation Process:
The service operations are performed using command line arguments:
- Install:
-ior--install - Uninstall:
-uor--uninstall - Start:
-sor--start - Stop:
-tor--stop
Example usage:
WindowsSessionManager.exe --install
- Install:
You can adjust the settings in the app.config file:
- TimerIntervalMinutes: The interval at which the timer runs (in minutes). Default: 5 minutes.
- SessionTimeoutMinutes: The duration after which a session is closed (in minutes). Default: 60 minutes.
- WhiteList: Comma-separated list of usernames that should not be closed.
Example app.config settings:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="TimerIntervalMinutes" value="5" />
<add key="SessionTimeoutMinutes" value="60" />
<add key="WhiteList" value="Administrator" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>- Install the Service: Use the
--installargument from the command line. - Start the Service: Use the
--startargument. - Stop the Service: Use the
--stopargument. - Uninstall the Service: Use the
--uninstallargument.
Contributions, bug reports, and feature requests are welcome. Please use the Issues section for any suggestions or improvements.
This project is licensed under the MIT License. See the LICENSE file for details.
This project was developed to automate session management. Your feedback is highly appreciated!