Can you start Windows in Safe Mode from Command Prompt?

The Advanced Boot Options screen lets you start Windows in advanced troubleshooting modes. You can access the menu by turning on your computer and pressing the F8 key before Windows starts.

Some options, such as safe mode, start Windows in a limited state, where only the bare essentials are started. If a problem doesn't reappear when you start in safe mode, you can eliminate the default settings and basic device drivers and services as possible causes. Other options start Windows with advanced features intended for use by system administrators and IT professionals. For more information, go to the Microsoft website for IT professionals.

Repair Your Computer

Shows a list of system recovery tools you can use to repair startup problems, run diagnostics, or restore your system. This option is available only if the tools are installed on your computer's hard disk. If you have a Windows installation disc, the system recovery tools are located on that disc.

Safe Mode

Starts Windows with a minimal set of drivers and services.

To start in safe mode:

  1. Remove all floppy disks, CDs, and DVDs from your computer, and then restart your computer. Click the Start button , click the arrow next to the Shut Down button (or the arrow next to the Lock button), and then click Restart.

  2. Do one of the following:

    • If your computer has a single operating system installed, press and hold the F8 key as your computer restarts. You need to press F8 before the Windows logo appears. If the Windows logo appears, you'll need to try again by waiting until the Windows logon prompt appears, and then shutting down and restarting your computer.

    • If your computer has more than one operating system, use the arrow keys to highlight the operating system you want to start in safe mode, and then press F8.

  3. On the Advanced Boot Options screen, use the arrow keys to highlight the safe mode option you want, and then press Enter.

  4. Log on to your computer with a user account that has administrator rights.

  • Safe Mode with Networking. Starts Windows in safe mode and includes the network drivers and services needed to access the Internet or other computers on your network.

  • Safe Mode with Command Prompt. Starts Windows in safe mode with a command prompt window instead of the usual Windows interface. This option is intended for IT professionals and administrators.

  • Enable Boot Logging. Creates a file, ntbtlog.txt, that lists all the drivers that are installed during startup and that might be useful for advanced troubleshooting.

  • Enable low-resolution video (640×480). Starts Windows using your current video driver and using low resolution and refresh rate settings. You can use this mode to reset your display settings. For more information, see Change your screen resolution.

  • Last Known Good Configuration (advanced). Starts Windows with the last registry and driver configuration that worked successfully.

  • Directory Services Restore Mode. Starts Windows domain controller running Active Directory so that the directory service can be restored. This option is intended for IT professionals and administrators.

  • Debugging Mode. Starts Windows in an advanced troubleshooting mode intended for IT professionals and system administrators.

  • Disable automatic restart on system failure. Prevents Windows from automatically restarting if an error causes Windows to fail. Choose this option only if Windows is stuck in a loop where Windows fails, attempts to restart, and fails again repeatedly.

  • Disable Driver Signature Enforcement. Allows drivers containing improper signatures to be installed.

  • Start Windows Normally. Starts Windows in its normal mode.

Need more help?

How to stop a "Safe Mode Loop"

Updated on November 1, 2022

What to Know

  • To force Windows to restart in Safe Mode, you'll need to access Advanced Startup Options in Windows 11/10/8.
  • Then, to get to Safe Mode from a command prompt, you'll use a bcdedit command.
  • There are several iterations of the Safe Mode command prompt you can use, depending on why you need to restart in Safe Mode.

There are a number of situations that could make it incredibly difficult to start Windows in Safe Mode. This is especially frustrating because whatever reason you have for needing to access Safe Mode is itself probably very frustrating!

How Do You Access Safe Mode?

In Windows 11, Windows 10, and Windows 8, Safe Mode is accessed from Startup Settings, which itself is accessed from the Advanced Startup Options menu. Unfortunately, Startup Settings only appears as an option in Advanced Startup Options if you access it from within Windows. In other words, Windows 11/10/8 needs to be working properly before you can boot into Safe Mode, which you only really need to use if Windows isn't working properly.

True, Advanced Startup Options (and thus Startup Settings and Safe Mode) do automatically appear during Windows startup problems, but the lack of easy from-outside-of-Windows access is a little troubling.

Windows 7 and Windows Vista have some less commonly occurring situations that make getting to Safe Mode nearly impossible, but they do happen.

Fortunately, there is a way to force Windows to start in Safe Mode if you can't get to Startup Settings in Windows 11, 10, and 8, or the F8 menu (Advanced Boot Options) in Windows 7 and Vista, or even if you can't access Windows at all.

A kind of "reverse" of this trick also works to stop Windows from starting in Safe Mode. If Windows continually boots directly to Safe Mode and you can't make it stop, take a look at the tutorial below and then follow the advice in How to Stop a Safe Mode Loop at the bottom of the page.

Time Required: Forcing Windows to restart in Safe Mode (or making it stop starting in Safe Mode) is moderately difficult and will probably take several minutes, at most.

How to Force Windows to Restart in Safe Mode

  1. Open Advanced Startup Options in Windows 11/10/8, assuming you're using one of those operating systems. Since you can't start Windows properly, use method 4, 5, or 6 outlined in that tutorial.

    With Windows 7 or Windows Vista, start System Recovery Options using your installation media or a system repair disc. Unfortunately, this process doesn't work with Windows XP.

  2. Open Command Prompt.

    Advanced Startup Options (Windows 11/10/8): Select Troubleshoot, then Advanced options, and finally Command Prompt.

    System Recovery Options (Windows 7/Vista): Click the Command Prompt shortcut.

  3. With Command Prompt open, execute the correct bcdedit command as shown below based on which Safe Mode option you'd like to start:

    Safe Mode:

    bcdedit /set {default} safeboot minimal 
    

    Safe Mode with Networking:

    bcdedit /set {default} safeboot network 
    

    Safe Mode with Command Prompt:

    bcdedit /set {default} safeboot minimal bcdedit /set {default} safebootalternateshell yes
    

    Be sure to type whatever command you choose exactly as shown and then execute it using the Enter key. Spaces are very important! The { and } brackets are the ones above the [ and ] keys on your keyboard. Two separate commands are required to start Safe Mode with Command Prompt, so be sure to execute them both.

  4. A properly executed bcdedit command should return this message:

    The operation completed successfully
    

    If you see one of these messages or something similar, check Step 3 again and make sure you executed the Safe Mode command properly:

    • The parameter is incorrect
    • The set command specified is not valid
    • ...is not recognized as an internal or external command...
  5. Close the Command Prompt window.

  6. In Windows 11, 10, and 8, select Continue.

    In Windows 7 and Vista, select Restart.

  7. Wait while your computer or device restarts.

  8. Once Windows starts, log in as you normally do and use Safe Mode however you were planning.

Windows will continue to start in Safe Mode every time you reboot unless you undo what you did in Step 3. The easiest way to do that is not by executing more commands, but via system configuration and following steps 11-14 in the tutorial.

How to Stop a Safe Mode Loop

If Windows is stuck in a sort of "Safe Mode Loop," preventing you from starting in normal mode again, and you've tried the instructions we gave in the Important call-out from Step 8 above but haven't been successful, try this:

  1. Start Command Prompt from outside of Windows, the process outlined in Steps 1 and 2 above.

  2. Execute this command once Command Prompt is open:

    bcdedit /deletevalue {default} safeboot
    
  3. Assuming it was successfully executed (see Step 4 above), restart your computer and Windows should then start normally.

If this isn't working and you're starting to think it might be worth it to just get a new computer, you might be right. Even the best computers can only last so long!

The 8 Best Desktop PCs of 2022 for Work, Gaming, & More

FAQ

  • How do I exit Safe Mode in Windows 10?

    Exiting Windows 10 Safe Mode is typically just a matter of restarting your PC. Another method is to press the Windows key + R, then type in "msconfig" and select OK > Boot and turn off Safe boot under Boot Options.

  • How do I enter Safe Mode in Windows XP if F8 isn't working?

    Normally restarting Windows XP in Safe Mode is just a matter of pressing F8 during startup. If the F8 key isn't working, check your keyboard for an F-Lock key that could have turned off your F keys. Otherwise, open your PC's BIOS menu and make sure Keyboard Support USB is turned on.

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe

What is Windows Safe Mode with Command Prompt?

Windows Safe Mode with Command Prompt is a special startup mode that allows you to access Windows in a stripped down session where many drivers are not loaded, there is no networking, and the desktop is not loaded.

How do I repair Windows 10 with Command Prompt?

In Windows 10/11, click Start > Settings > Update & Security > Recovery > Advanced startup and then Restart now to boot into recovery environment. And then, click Troubleshoot > Advanced options > Command Prompt or directly press Shift + F10 to summon it.

Can I restore in Safe Mode from Command Prompt?

Tips: If you prefer to use Command Prompt, you can enter Safe Mode with Command Prompt. Then, type “rstrui.exe” and press Enter to open System Restore.

How do I start Windows 10 in Safe Mode from boot up?

Boot into Safe Mode from the sign-in screen in Windows 11 or Windows 10. Restart the computer. At the sign-in screen, hold the Shift key down and then click Power > Restart. After the computer restarts to the Choose an Option screen, select Troubleshoot > Advanced Options > Startup Settings > Restart.