Shutter is a Windows service that schedules automatic system shutdowns based on a configurable time. It runs in the background and ensures that your system shuts down at the specified time every day.
- Runs as a Windows service
- Reads shutdown time from a configuration file
- Automatically shuts down the system at the specified time
- Includes an installer and uninstaller for easy setup
- Download
ShutterInstaller.exe
from the Releases page. - Run the installer as an administrator.
- The service will be installed and started automatically.
The shutdown time is specified in a JSON configuration file.
C:\Program Files (x86)\Shutter\config.json
{
"shutdown_time": "22:30"
}
- ⏰ The time format is HH:MM (24-hour format).
- If the config file is missing or invalid, the default shutdown time is 17:40.
-
Service Execution
- The service reads the shutdown time from the config file.
- It checks the current system time every minute.
- If the current time matches the shutdown time, it executes
shutdown /s /t 0
to turn off the computer.
-
Installation Script
- Uses NSIS (
install-shutter.nsi
) to install the service and copy necessary files. - Registers the service with
sc create
and starts it automatically.
- Uses NSIS (
To uninstall Shutter:
- Run
Uninstall.exe
from the installation directory (C:\Program Files (x86)\Shutter
). - Alternatively, run the following command in an administrator command prompt:
sc stop ShutterService sc delete ShutterService
- Delete the installation folder manually if needed.
- Go compiler
- NSIS (to create the installer)
- Clone the repository:
git clone https://github.com/2mdtln/Shutter.git cd Shutter
- Build the executable:
go build -o shutter.exe
- Create the installer:
makensis install-shutter.nsi
This project is open-source and available under the MIT License.