Simple if in .bat or .cmd to check if booted in safe mode or not

Viewed 2247

OS: Win 7 I googled a lot and I found one answer here which not helping me as it outputs just the answer (I cannot used it in IF statement

I have also found this

if  /i  "%SAFEBOOT_OPTION%"=="MINIMAL" echo We're in Safe Mode! 

I have tried it almost 10 times and the SAFEBOOT_OPTION variable is always empty.

4 Answers
Related