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.