Skip to content

ataberkus/AutoPcShutdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Auto PC Shutdown Program

A Windows desktop utility to schedule automatic Shutdown, Restart, Log Off, Lock, Sleep Mode, or Alarm actions on your PC with a configurable countdown timer.

Built with C# and Windows Forms targeting .NET 8.0. Publishes as a single .exe file.

Features

  • 6 Power Actions — Shutdown, Restart, Log Off, Lock, Sleep Mode, Set Alarm
  • Configurable Timer — Set hours (0–23), minutes (0–59), and seconds (0–59)
  • Force Close Option — Optionally force-close applications when shutting down, restarting, or logging off
  • Timer Controls — Pause, Resume, and Cancel the countdown at any time
  • System Tray — Minimizes to the system tray; double-click the tray icon to restore
  • Dark Theme — Modern dark UI with color-coded action buttons

Requirements

Download

Download the latest AutoPcShutdown.exe from the Releases page.

Build from Source

Prerequisites

Quick build

git clone https://github.com/ataberkus/AutoPcShutdown.git
cd AutoPcShutdown
dotnet build

Publish a single .exe

dotnet publish -c Release

Produces a single AutoPcShutdown.exe (~170 KB) at:

AutoPcShutdown/bin/Release/net8.0-windows/win-x64/publish/

Requires .NET 8 Desktop Runtime on the target machine. Windows automatically prompts to install it if missing.

Usage

  1. Set the desired countdown time using the Hour, Minute, and Second dropdowns.
  2. Check or uncheck Force close apps (checked by default).
  3. Click one of the six action buttons to start the countdown.
  4. Use Pause, Resume, or Cancel to control the timer.
  5. When the timer reaches zero, the selected action executes automatically.

Actions

Button What it does
Shutdown shutdown.exe /s /t 0 [/f]
Restart shutdown.exe /r /t 0 [/f]
Log Off shutdown.exe /l [/f]
Lock rundll32.exe user32.dll,LockWorkStation
Sleep Mode Application.SetSuspendState(PowerState.Suspend)
Set Alarm Plays a system sound and shows a "Time is up!" message

Project Structure

AutoPcShutdown/
├── AutoPcShutdown.sln
├── .gitignore
├── README.md
└── AutoPcShutdown/
    ├── AutoPcShutdown.csproj
    ├── Program.cs
    ├── MainForm.cs
    └── MainForm.Designer.cs

Author

ataberkus

License

This project is open source. Feel free to use, modify, and distribute.

About

Windows desktop utility to schedule automatic Shutdown, Restart, Log Off, Lock, Sleep, or Alarm actions with a configurable countdown timer. Built with C# and Windows Forms (.NET 8).

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages