Windows – Prevent Windows 10 from log off, restart, or shut down with open files/programs

automatic updateshutdownwindows 10windows 7

I'm looking for a group policy setting or a third-party program that can prevent Windows 10 (and earlier) from a logoff, restart, or shutdown command, initiated by either the user or the system.

I didn't have as many issues with this in Windows 7, however Windows 10 has automatically restarted my computer several times from updates in the middle of me working on something. I know other users have complained about this over the past several months as well. I have also accidentally logged off of my computer once or twice before while I have programs and files open, and it doesn't prompt to close programs or anything of that nature.

I would like to be able to totally prevent the system from logging off, restarting, or shutting down unless I manually close all of my open programs and files first. Does anyone know of a way to do this?

As a note, I've already set the local policy item under Computer Configuration > Administrative Templates > System > Shutdown Options for "Turn off automatic termination of applications that block or cancel shutdown" to "Enabled".

:::EDIT:::

I've seen this question: Is there some way to prevent any and all restarts? Not just from Windows Update?

Unlike that question, I'm asking for a group policy setting (that I haven't already set) or a third-party program that will prevent Windows 10 (and earlier) from not only being shutdown or restarted, but also prevents a log off command. The question linked refers to no program or group policy that will suffice as an answer to my question.

Best Answer

Well, I finally found a solution to this problem of mine. There's a third-party program called "Don't Sleep" (http://www.softwareok.com/?seite=Microsoft/DontSleep) which does exactly what I need it to do.

While running, it will prevent an inadvertent logoff, restart, or shutdown of the computer either via an automated Windows Update, a program prompting for a restart, or from a user error of mis-clicking one of the power options from the Windows Start Menu. To perform the power option you'd like, just close the program. "Don't Sleep" can be set to run automatically upon startup and can keep itself in the taskbar. Also, it's a portable program so there's no installation necessary.

I'm unsure of why my question got downvoted twice, but regardless I hope this can help anyone else who has a similar problem/question that I had.

Related Question