Adblock breaks this site

How to Prevent Windows From Restarting Without Your Permission

Discussion in 'Programming General' started by Trent!, Jul 19, 2014.

  1. Trent!

    Trent! Guru
    $5 USD Donor New

    Joined:
    Aug 21, 2010
    Posts:
    1,845
    Referrals:
    2
    Sythe Gold:
    7
    Two Factor Authentication User
    How to Prevent Windows From Restarting Without Your Permission

    Howdy, so over the years I've had the issue where Windows decides to randomly boot me off and restart, without my permission via a prompt. I found a registry edit that solves this issue. You will still need to restart your computer every once in awhile, but all that is entirely in your control.

    This is now a downloadable solution!

    DISCLAIMER: This script makes changes to your registry. Improper changes to a registry can lead to undesirable results, so avoid changing the source unless you know what you're doing
    I have added error logging. These are saved at: C:\Users\YourNameHere\Documents. Please post/PM me these logs!

    Basically, using a PowerShell script this should theoretically allow you to have the entire fix automated for you. I created this script because I reformat a lot and this is a long-term solution that makes my process easier.

    [SOURCE CODE]

    [DOWNLOAD]

    You will need Winrar or 7-zip installed!!!
    Right-Click -> Extract Here

    [​IMG]

    Open the folder called "Auto Reboot Preventer"

    [​IMG]

    All of the instructions (very simple) are included within the 'Read Me!.txt' file.

    [​IMG]
     
  2. 70i

    70i Forum Addict
    Banned

    Joined:
    Jan 11, 2014
    Posts:
    462
    Referrals:
    0
    Sythe Gold:
    174
    How to Prevent Windows From Restarting Without Your Permission

    This sounds like a useful program to run, but I have some cosmetic suggestions. How about uploading the compiled version because most don't know about Powershell or don't want to compile it themselves. Maybe put a more meaningful output message other than true or false perhaps something like "Script succesful, Windows will no longer shut down when you're logged on". "No Auto Reboot" sounds better than "NoAutoRebootWithLoggedOnUsers" in my opinion.
     
  3. Trent!

    Trent! Guru
    $5 USD Donor New

    Joined:
    Aug 21, 2010
    Posts:
    1,845
    Referrals:
    2
    Sythe Gold:
    7
    Two Factor Authentication User
    How to Prevent Windows From Restarting Without Your Permission

    Yeah my goal is to have a working version, then polish it up. This is my first script with PowerShell so it's a learning process.

    I will probably add a download link in the near future.
     
  4. Trent!

    Trent! Guru
    $5 USD Donor New

    Joined:
    Aug 21, 2010
    Posts:
    1,845
    Referrals:
    2
    Sythe Gold:
    7
    Two Factor Authentication User
    How to Prevent Windows From Restarting Without Your Permission

    I just overhauled and finished the script. It should now work on all Administrator accounts, even if script execution is not manually enabled. I have also included a downloadable version. It uses a batch file along with the script to achieve its goals. Error logging and feedback from the script is now included. Please let me know if there's any problems
     
  5. Trent!

    Trent! Guru
    $5 USD Donor New

    Joined:
    Aug 21, 2010
    Posts:
    1,845
    Referrals:
    2
    Sythe Gold:
    7
    Two Factor Authentication User
    How to Prevent Windows From Restarting Without Your Permission

    I've updated this to what I *think* will be my final version, unless someone runs into some errors that require me to update it. I can't think of anything else that would need to be added to it.

    This version includes an update to allow for more accurate success detection when the script is run.
     
< C++ Question | Functional Programming >


 
 
Adblock breaks this site