Skip to content

Releases

v1.0.0 — A power button you can take back

Choose a tag to compare

@doggybear233 doggybear233 released this 31 Oct 06:57

One click to shut down — and five seconds to change your mind.

Press the power button and a small card comes up just above the taskbar, next to Start, and a red ring counts five seconds down. Press it again, hit Esc, or press Cancel in the card, and it goes away. Do nothing and the machine shuts down.

No confirmation box, and nothing to press twice. You get five seconds, and the button you pressed takes them back.

Double-click the button, or hold Shift while you click, and the power menu opens instead: sleep, restart, sign out, lock, display off, shut down later, cancel shutdown, countdown settings. The card and the menu are drawn by the program rather than by Explorer, so they look like Windows 11 at any scaling, in your display language. Nothing appears for the first 200 ms, which is what lets a double-click go straight to the menu without a shutdown card flashing up in between. (If the card is already open, the button on it opens the same menu.)

  • Cancel is the same button. The countdown is dismissed from the pin you pressed, not from a window you have to go find.
  • It never steals focus. The card is a small always-on-top window, so work behind it keeps running and typing keeps going to the app you were using.
  • No Windows "shutting down in less than a minute" dialog. The machine is only asked to power off when the countdown reaches zero, via ExitWindowsEx.
  • No /f. Apps that refuse to close still get their normal "these apps are preventing shutdown" screen, so unsaved work is not destroyed.
  • Same slot, same icon position. The existing shutdown.lnk is rewritten in place instead of adding a second pin; uninstall restores the original shortcut from a backup.
  • Quiet by design. No logs, no network, no background process, no admin rights.

Install

  1. Download taskbar-power-button-1.0.0.zip and unzip it anywhere.
  2. Double-click install.cmd — it bypasses the execution policy for that one run and keeps the window open so you can read the result.
  3. If the taskbar icon does not change immediately, sign out and back in — the shortcut is already correct, only Explorer's icon cache is stale.

No administrator rights are needed. The zip contains the C# source; the installer compiles it with the csc.exe that ships with .NET Framework 4.x. It looks for shutdown.lnk, then for any pinned shortcut whose target is shutdown.exe, so a renamed or localised button is still found; -LnkPath points it at a specific file, and it never touches a shortcut that is not a power button. The installer talks Chinese, Japanese or English depending on your display language.

Requirements

Windows 10 or 11, 32-bit or 64-bit (ARM64 too) · .NET Framework 4.x · MIT licence

Verify the download:

787317f037cb42b45a2b52631a3405e34dae4a54f7f4f08115e676b58fc62927 *taskbar-power-button-1.0.0.zip

電源ボタンを押すと、タスクバーのすぐ上、スタートの隣に小さなカードが出て、赤いリングが 5 秒を数え始めます。もう一度押すか、Esc、カードの「シャットダウンを中止」で消えます。何もしなければシャットダウンします。ボタンをダブルクリックするか Shift を押しながらクリックすると、今度は電源メニュー(スリープ・再起動・サインアウト・ロック・ディスプレイをオフ・時間を指定してシャットダウンなど)が開きます。カードもメニューもプログラムが描くので、どの拡大率でも Windows 11 らしく見え、表示言語に合わせます。クリック後 200 ミリ秒は何も出ないため、ダブルクリックでメニューへ直行し、シャットダウンのカードがちらつくことはありません。

Windows 標準の「1 分以内にシャットダウンします」ダイアログは表示されません。カウントダウンが 0 になった時点で初めて ExitWindowsEx を呼び出すためです。


点一下任务栏的电源按钮,任务栏上方、开始按钮旁边会浮出一张小卡片,红色圆环倒数五秒。再点一次、按 Esc,或者点卡片里的「取消关机」,卡片就收起来;什么都不做,时间到了就关机。双击按钮(或按住 Shift 再点)打开的是电源菜单:睡眠、重启、注销、锁定、关闭显示器、定时关机、取消关机、倒计时设置。卡片和菜单都由程序自己绘制,所以任何缩放比例下都像 Windows 11 的一部分,文案也跟着显示语言走。按下后 200 毫秒内什么都不显示,双击因此能直接进菜单,中间不会闪出关机卡片。

不会弹出 Windows 自带的「一分钟内关机」提示框——倒计时归零时才调用 ExitWindowsEx。