Sep 17, 2013 at 12:45pm UTC
Hi all,
it has been so long since i visited this forum . . .
So, i need to know how to restart windows in safe mode. I know you can edit the boot.ini in xp but how would you go about in windows 7 and later
Please answer this I am familiar with WINAPI Thankyou everyone in advance !
Sep 17, 2013 at 2:59pm UTC
If you want an easy way to boot into
safe mode , write yourself a couple of command scripts. Something like this should do the trick:
1 2 3
@echo off
bcdedit /set safeboot network
shutdown -r -f -t 0
SafeBootOn.cmd
1 2 3
@echo off
bcdedit /deletevalue safeboot
shutdown -r -f -t 0
SafeBootOff.cmd
NB: Probably need to run them as administrator
Last edited on Sep 17, 2013 at 3:03pm UTC
Sep 17, 2013 at 4:26pm UTC
Last edited on Sep 17, 2013 at 5:49pm UTC
Sep 18, 2013 at 6:04am UTC
Thankyou all,
for your reply . . .
the batch file does the job!
but I would like to know how to use the ExitwindowsEx booting into safe mode ???
I am using codeblocks i dont know how to use WMI . . . :(
anyways Thankyou everyone in advance !
Sep 18, 2013 at 10:16am UTC
ExitwindowsEx does not allow you to define which o/s config starts up when you reboot. For that you need to use bcdedit or the BCD WMI Provider.
Andy
Sep 18, 2013 at 3:19pm UTC
I misunderstood the question, I was thinking that @OP want to restart windows when the application is running in safe mode, sorry.
Last edited on Sep 18, 2013 at 3:20pm UTC
Sep 19, 2013 at 2:34pm UTC
Thankyou all for your help !
I will use the batch file!
please answer all my questions that i will be posting in this forum!
-Aravind