Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check if Windows OS runs in safe mode

Tags:

windows

winapi

What Windows API call do I need in order to check whether the system booted in safe mode or normal mode?

like image 311
ST3 Avatar asked Jul 25 '13 14:07

ST3


People also ask

How do I know if my OS is in Safe Mode?

While it's booting up, hold down the F8 key before the Windows logo appears. A menu will appear. You can then release the F8 key. Use the arrow keys to highlight Safe Mode (or Safe Mode with Networking if you need to use the Internet to solve your problem), then press Enter.

How do I start w10 in Safe Mode?

At the sign-in screen, hold the Shift key down while selecting Power > Restart. After the PC restarts to the Choose an option screen, select Troubleshoot > Advanced options > Startup Settings > Restart. After the PC restarts, a list of options is shown. Select 4 or F4 to start your PC in Safe Mode.

How do I start Windows 7 in Safe Mode if F8 doesn't work?

Press Windows + R button and type the word 'msconfig,' into the dialog box on the screen. Then, proceed with the Enter tab. Then, you need to select 'Secure Boot' under the Download section and go for one of the Safe Boot options as given below. Confirm with Apply> OK to restart the Windows in safe mode.


1 Answers

Call GetSystemMetrics( SM_CLEANBOOT ) and look for a nonzero value.

like image 69
Alex K. Avatar answered Oct 02 '22 19:10

Alex K.