BootState.exe, Version 1.00 Show Windows' boot state Usage: BootState.exe Notes: Boot state is returned both as a string and as return code: "Normal" (rc = 0) "Safe mode" (rc = 1) "Safe mode with network" (rc = 2) "Windows PE" (rc = 3) In case of (command line) errors, the return code will be -1. Credits: Windows PE detection based on a tip by Mitch Tulloch http://techgenix.com/HowtodetectwhetheryouareinWindowsPE/ Written by Rob van der Woude http://www.robvanderwoude.com