Building a PC Shutdown Timer
How scheduled shutdown works
Set the timer for one hour and confirm, and the page converts it to 3,600 seconds and sends it to the helper through a solartime-timer:// link. The original PowerShell version ran shutdown.exe. The Store app calls the Windows API directly.
public int Schedule(int seconds) {
if (seconds < 60 || seconds > 359940) return 87;
return WithPrivilege(() => InitiateSystemShutdownEx(
null, "Solar Time scheduled shutdown", (uint)seconds, true, false, 0x80040000));
}
A shutdown reservation in the Solar Time Timer panel.
What the Windows helper does
The helper checks that the time is within the allowed range, then Windows handles the countdown. The reservation stays in place after you close the browser, and you can cancel it before time runs out. Microsoft’s Windows shutdown API documentation
An earlier version of the helper alongside Solar Time’s Timer panel.Why I moved it to Microsoft Store
I tested scheduling and cancellation myself in the PowerShell version. I also thought about how someone trying it for the first time might feel about running a script downloaded from a website. They might worry it could install malware. That’s what led me to put the helper in the familiar Microsoft Store. It has passed the Store’s review and is available to install through the link. Solar Time Shutdown Helper
Solar Time Shutdown Helper in Microsoft Store.A scheduled shutdown can force open apps to close, so save your work first. Microsoft’s Windows shutdown guidance
