Is there a command to restart computer into safe mode? [closed]
Asked Answered
E

2

29

I would like to know if there is a command that could be written in the command line to restart the computer and make it boot in safe mode?

If there isn't a command like this, is there any other way to do it?

I would like the process to be fully automated after launching the command.

Ephram answered 2/10, 2012 at 14:43 Comment(5)
See: serverfault.com/questions/55063/… it's not "simple".Benadryl
And operating system is?Accelerant
Operating system is windows server 2003, i forgot to mention, but i guess its obvious now that i have to change the boot.iniEphram
Why was this question shut down? It has over 100,000 visits, and contains a question and it's correct answer..?? Please help me to understand why it is 'Off Topic' so I can avoid the same happening to me?Limitary
@Bevan: There is no indication that this is a programming question. It would probably be a better fit for Super User.Peru
F
69

My first answer!

This will set the safemode switch:

bcdedit /set {current} safeboot minimal 

with networking:

bcdedit /set {current} safeboot network

then reboot the machine with

shutdown /r

to put back in normal mode via dos:

bcdedit /deletevalue {current} safeboot
Finisterre answered 2/10, 2012 at 14:49 Comment(4)
also, your question might have been better posted at serverfault.comFinisterre
This is only for Vista, 7 and Server 2008. For earlier Windows versions look for boot.ini. For linux look for grub.Accelerant
What is replaced by {current} ?Macaco
In Windows 8.1 on a Sony Vaio laptop I had to use {default} instead of {current}. As noted in another answer type "bcdedit /enum" and find the identifier.Rightism
G
11

In the command prompt, type the command below and press Enter.

bcdedit /enum

Under the Windows Boot Loader sections, make note of the identifier value.

To start in safe mode from command prompt :

bcdedit /set {identifier} safeboot minimal 

Then enter the command line to reboot your computer.

Garneau answered 2/10, 2012 at 14:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.