How to find out how often Windows Seven has rebooted?

Each startup and shutdown is recorded in the Event Logs. Open the Event Viewer, and go to the System logs section. If you filter these records (Use the Filter Current Log button on the right) by the Event Numbers 12 and 13, you should just get the events notifying when the system is shutting down and starting up.

Event ID 12 is the system starting up, Event ID 13 is the system shutting down. It also provides the exact time when the event was logged in the event itself.

You could get your application to count the number of events with Event ID 12, which should give you what you want.


I found the answer.

Find over:

"HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters\BootId" 

The value, in decimal, that you will see is the number of times that your system already rebooted.


Here's another way : S.M.A.R.T

The vast majority of hard drives these days store SMART information. There are two pieces of informations you might be interested in : 04 Start/Stop Count 12 Power Cycle Count

Check out the wikipedia article on S.M.A.R.T and possibly the documentation of smartmontools.

smartmontools is an open-source project which can query this data in a CLI, or there are other programs around that can get this data with various GUIs : Wikipedia list of SMART tools