Avoid accidental and automatic shut down or restart with ShutdownGuard

Microsoft has always allowed applications to shut down or restart Windows programmatically. Installers of various desktop apps, or the apps themselves as well as various Windows components such as Windows Update can automatically shut down or restart your PC on demand or on a schedule.  If you do not like this behavior, thankfully, Windows has a way to avoid it. Using a simple, third party tool called ShutdownGuard, we can stop automatic shutdown, restart, and logoff without affecting manual ways to do it.

Microsoft provides an API in the OS which applications can use to delay or veto a shut down, restart or log off. It is necessary to have this ability because while doing certain actions on your PC such as when burning an optical disc or when downloading files, it is imperative that your PC doesn't exit Windows suddenly. The application called ShutdownGuard uses this API to prevent shut down when some program calls for it.

  1. Download and install ShutdownGuard from this page. During the installation, check the option to Autostart.
    Shutdown
  2. Allow the installer to open ShutdownGuard or start it manually. It will place its icon in the notification area (system tray). The icon may also be hidden inside the overflow area. In that case, click the tiny arrow to show it.
    ShutdownGuard
  3. Right click the ShutdownGuard to access its settings. You can hide its tray icon (not recommended), disable it, or configure options such as Autostart.
  4. It has advanced settings in an INI file called C:\Program Files\ShutdownGuard\ShutdownGuard.ini. If you have User Account Control (UAC) set to the highest level, you may need to open this file as administrator to save changes to it. By editing the INI in Notepad or another text editor, you can customize the text message it shows when a shutdown is blocked, and some other options.
  5. When ShutdownGuard is running and the tray icon is "locked", every time Windows, or some app or the user attempts a restart or shutdown, the following message will be shown by Windows:  shutdown guard You can click here "Shut down anyway" or "Restart anyway" to continue shutting down. However, this will forcibly terminate all apps. This screen will show you all running applications. If you have unsaved work, you can click Cancel which will take you back to the Desktop. There you can close apps properly, save your work and then safely continue with the Shutdown.
  6. To allow a shut down, just left click once on the ShutdownGuard icon in the notification area so it "unlocks" shut down. Now when you try manual shut down/restart or log off or when some app attempts it, it won't be blocked.
    Unlocked

That's it. Now you can know how to avoid most of those unexpected and untimely reboots. It is important to note that ShutdownGuard is not 100% foolproof. Windows or apps still have the ability to override it if they force the shutdown. ShutdownGuard just gives you an opportunity to save your work in open windows and avoid unexpected restarts which are automatically initiated by installers or apps.

ShutdownGuard is made by the developer, Stefan Sundin. It is a free app but accepts donations.

7 thoughts on “Avoid accidental and automatic shut down or restart with ShutdownGuard

  1. Ha.

    If it’s not from Microsoft.com then it’s most likely full of malwhere, avoid.

    Poorly-rated. Like or Dislike: Thumb up 0 Thumb down 18

    Reply
    1. Sergey Tkachenko

      I would like to say that you are 100% wrong.

      Well-loved. Like or Dislike: Thumb up 13 Thumb down 0

      Reply
    2. Lol

      Silly cunt.

      Like or Dislike: Thumb up 1 Thumb down 0

      Reply
  2. Dean Williams

    I would bet my life on this app NOT containing any Malware or Virus… In fact my Malware scanner and my Antivirus also bet their reputations on this fact.

    Like or Dislike: Thumb up 1 Thumb down 1

    Reply
    1. Bob

      It is absolutely safe. The app doesn’t even itself block shutdown or restart. It just calls the Windows API until you tell it it’s OK to restart.

      Like or Dislike: Thumb up 0 Thumb down 0

      Reply
  3. Steven

    I often leave my computer on overnight for long calculations like POVray renderings. As I understand it, this app won’t actually avoid a reboot if I’m not there to click “cancel”, right?

    Like or Dislike: Thumb up 0 Thumb down 0

    Reply
    1. Gaurav

      It should avoid a reboot but if you go away, it will only take you at that screen pictured in the screenshots above. When you return, you might have to press Cancel. But the reboot *should* be prevented. It works for me that way on Windows 8.1. Let us know if it works for you that way on Windows 10.

      Like or Dislike: Thumb up 0 Thumb down 0

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *