Disable F8 Key and Boot Options to Block Access to Safe Mode during Windows Startup

Disabling Safe Mode For Windows Vista, 7 and 8

Now we’ll show you how to disable Safe Mode in Windows Vista, Windows 7 and also Windows 8.

Disabling the Advanced Boot Options menu

There is a simple way to completely disable the Safe Mode options when you press F8 on boot in Windows Vista and 7. This works by editing the Boot Configuration Data (BCD) information from the Windows Command Prompt. Here’s how;

1. Press the Win key and type CMD in the search box, then hold Ctrl+Shift and press Enter to launch the Command Prompt with administrator privileges.

2. Type the following command into Command Prompt:

bcdedit /set {bootmgr} displaybootmenu no

This turns off the Advanced Boot Options menu completely and pressing F8 doesn’t do anything. To enable it again, simply type the following into Command Prompt:

bcdedit /set {bootmgr} displaybootmenu yes

The drawbacks are similar to the editing of NTLDR in Windows XP because you can still use the Safe Boot option from MsConfig and hiding the menu isn’t very useful for multiboot systems. Another loophole is the boot menu will show after an improper startup/shutdown or sudden loss of power, and Windows will ask if you want to repair etc. But this way does at least still deter the average user or kids from pressing the F8 key to access Safe Mode.

Editing the Windows Vista, 7 and 8 Registry

Vista, 7 and 8’s Safe Mode also relies on the same registry keys as Windows XP does (Minimal and Network), and renaming them does also work which will cause a blue screen of death if anyone attempts to enter Safe Mode. The main difference is that these keys are protected and extra steps are required to change the permissions for each key. The procedure for Windows 8 is broadly the same apart from a few buttons being in different places etc.

1. Open regedit by typing it into search in the Start menu or Run dialog (Win key+R), and navigate to the key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SafeBoot

2. Right click on the Minimal key -> Permissions -> Advanced -> Owner tab. Click on your user name in the “Change owner to” box and then tick “Replace owner on subcontainers and objects”. Click Apply. The new name should appear in the Current owner box.

Changing the owner permissions

3. Now click on the Permissions tab -> Add -> and type your user name into the box, pressing Check Names will make sure you have typed it correctly. Click OK.

Adding a new user

4. In the next window, tick the Allow box for Full Control (top left tick box), this will automatically tick all other allow boxes. Click OK.

Granting full control to the new user

5. Your name should now appear in the main Permissions window with full control and not inherited permissions. Highlight your user and tick “Replace all child object permissions with inheritable permissions from this object”. Then untick “Include inheritable permissions from this object’s parent”, click the Add button in the security warning window that pops up, then finally click OK -> Yes -> OK.

Replacing the user inherited permissions

6. If the instructions were followed correctly, you should be able to right click on the Minimal key and rename it to MinimalX or similar. Follow steps 2 to 5 again for the Network key and then rename it.

Renaming Minimal and Network in Windows 7

The effect is exactly the same as with XP, if anybody attempts to boot into Safe Mode using normal, with networking or with Command Prompt, the computer will produce a blue screen of death. A non booting Windows will mean that to get back into Safe Mode, you will need to edit the registry keys offline using a boot CD.

A Few Shareware Solutions to Disable Safe Mode

If you want to disable the F8 key for just about any operating system from windows 2000 up to Windows 8, a shareware tool called NoSafeMode could be an option. It’s a simple tool of around 60KB, portable, and does not hack or modify the operating system files or registry.

nosafemode

NoSafeMode has a password option to allow only authorized users to access all boot options by using the lock password and pressing Ctrl+F8 on boot. After studying how NoSafeMode does this trick without touching the registry or system files, we tracked the changes down to the program modifying the hard drive’s boot sector and writing its own custom sector with the password and key disabling code. NoSafeMode does have a trial mode where the lock will disable itself at midnight on the day you install the lock, the personal edition costs $14.95 and for business you’ll have to pay $89.95 for the professional edition.


Another option is a small command line tool called DisableSafeMode that works on Windows Vista and above and is $19 for personal use or $99 for business. This tool doesn’t change the hard drive boot sector, but the author doesn’t explain what it does to disable Safe Mode. Usage is simple, open an admin Command Prompt and type “DisableSafeMode.exe start” or “DisableSafeMode.exe stop” to turn it on or off.

DisableSafeMode start command

After tracking down what this program actually does to disable the Safe Mode menu, the error recovery screen and also the system recovery options screen, it appears to be a simple collection of commands using the Windows Boot Configuration Data Editor (BCDEdit) which anyone can type in themselves. Here are the commands we believe it uses:

bcdedit /set {current} bootems off
bcdedit /set {current} advancedoptions off
bcdedit /set {current} optionsedit off
bcdedit /set {current} bootstatuspolicy IgnoreAllFailures
bcdedit /set {current} recoveryenabled off

If Windows fails and isn’t bootable, you would have to boot using your Windows DVD and choose Repair your computer -> Command Prompt and type in the reverse commands from those above (off -> on, ignoreAllFailures -> displayallfailures). Unless it does something else we haven’t tracked, DisableSafeMode only seems to insert a few system commands which you can do yourself for free.

21 Comments - Write a Comment

  1. Kartik 4 months ago
  2. omar 1 year ago
  3. Andrew Porter 2 years ago
  4. UYIKINGS 2 years ago
  5. Edward 3 years ago
    • HAL9000 3 years ago
  6. Sonya 3 years ago
  7. FARKAS 3 years ago
  8. Bryan 4 years ago
  9. jigs 4 years ago
  10. skyline 7 years ago
  11. hosein 7 years ago
  12. Ranjeet 9 years ago
  13. Syahid A 9 years ago
  14. Firas 9 years ago
  15. hanan 9 years ago
  16. Roy Raay 9 years ago
  17. Ishaan 9 years ago
  18. manoj 9 years ago
  19. grage 9 years ago
  20. James Kim 9 years ago

Leave a Reply

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

Note: Your comment is subject to approval. Read our Terms of Use. If you are seeking additional information on this article, please ask in our forum or contact us directly.