Finding out how the machine last rebooted and when.

  • Thread starter Thread starter UJ
  • Start date Start date
U

UJ

How can I find out when the machine last rebooted and where it was a system
crash or an regular reboot.

This would be on XP.

TIA - Jeff.
 
UJ said:
How can I find out when the machine last rebooted and where it was a
system crash or an regular reboot.

As far as I know, the C# language doesn't provide any built-in mechanism for
getting that information.
 
You should write some code to check the operating system event log.
On windows 2003 each time you reboot your computer a new entry is added
to the system log with event id 1074, but on XP you may have to enable
this service since it usually comes disabled.

You can find info on how to enable de Shutdown event tracker here...
http://support.microsoft.com/default.aspx?scid=kb;en-us;293814

That would cover a graceful shutdown

And if by a system crash you mean bsod there is an event entry too i'm
not very sure right now but i think its event id 1003

Hope it helps
 
Torcaza said:
You should write some code to check the operating system event log.
On windows 2003 each time you reboot your computer a new entry is added
to the system log with event id 1074, but on XP you may have to enable
this service since it usually comes disabled.

You can find info on how to enable de Shutdown event tracker here...
http://support.microsoft.com/default.aspx?scid=kb;en-us;293814

That would cover a graceful shutdown

System.Diagnostics.EventLog.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top