This command line program can be run in the background to shutdown a Windows PC after a configurable amount of user inactivity.
.\auto-shutdown.exe [-h] [-i] [-p] [-w]
-
(optional) -h --help
-
(optional) -i --inactivity_min Time of inactivity in minutes until shutdown is initiated. The default value is '30'.
-
(optional) -p --polling_s Polling interval in seconds to check if a shutdown should be initiated. This parameter is optional. The default value is '60'.
-
(optional) -w --warning_s Print a warning to stdout n seconds before the shutdown will be initiated. This parameter is optional. The default value is '0'.
The releases section, contains two executables:
- auto-shutdown.exe which when run opens a terminal window to display the stdout of the program.
- auto-shutdown-service.exe which completely runs in the background.
- This program should work on most recent versions of Windows. I tested it on Windows 10 and 11 but it should work on earlier versions without a problem as it only depends on the win32 API and the
shutdowncmd command.
This project is licensed under the MIT License - see the LICENSE.txt file for details. The license to used third party code is contained in parser/LICENSE.txt.
To parse command line arguments, the program uses CMDParser by FlorianRappl.