how to detect safe mode
Is there a way of detecting if Windows (2k/XP/2003) is running in safe mode or NOT ?
7 posts
You can learn more about SystemMetrics.
!define NAME "SafeMode"
!define SM_CLEANBOOT 67
Name "${NAME}"
Caption "${NAME}"
OutFile "${NAME}.exe"
ShowInstDetails show
Section "-boo"
System::Call 'user32::GetSystemMetrics(i ${SM_CLEANBOOT}) i .r0'
DetailPrint "Returning values:"
DetailPrint "0 - Normal boot"
DetailPrint "1 - Fail-safe boot"
DetailPrint "2 - Fail-safe with network boot"
DetailPrint "You PC started as: $0"
SectionEnd