How can I get the Windows last reboot reason How can I get the Windows last reboot reason windows windows

How can I get the Windows last reboot reason


This article explains in detail how to find the reason for last startup/shutdown. In my case, this was due to windows SCCM pushing updates even though I had it disabled locally. Visit the article for full details with pictures. For reference, here are the steps copy/pasted from the website:

  1. Press the Windows + R keys to open the Run dialog, type eventvwr.msc, and press Enter.

  2. If prompted by UAC, then click/tap on Yes (Windows 7/8) or Continue (Vista).

  3. In the left pane of Event Viewer, double click/tap on Windows Logs to expand it, click on System to select it, then right click onSystem, and click/tap on Filter Current Log.

  4. Do either step 5 or 6 below for what shutdown events you would like to see.

  5. To see the dates and times of all user shut downs of the computer

A) In Event sources, click/tap on the drop down arrow and check the USER32 box.

B) In the All Event IDs field, type 1074, then click/tap on OK.

C) This will give you a list of power off (shutdown) and restartshutdown type of events at the top of the middle pane in Event Viewer.

D) You can scroll through these listed events to find the eventswith power off as the shutdown type. You will notice the date andtime, and what user was responsible for shutting down the computer perpower off event listed.

E) Go to step 7.

  1. To see the dates and times of all unexpected shut downs of the computer

A) In the All Event IDs field type 6008, then click/tap on OK.

B) This will give you a list of unexpected shutdown events at thetop of the middle pane in Event Viewer. You can scroll through theselisted events to see the date and time of each one.


Take a look at the Event Log API. Case a) (bluescreen, user cut the power cord or system hang) causes a note ('system did not shutdown correctly' or something like that) to be left in the 'System' event log the next time the system is rebooted properly. You should be able to access it programmatically using the above API (honestly, I've never used it but it should work).