Windows XP has a new feature Shutdown Event Tracker
which allows one to record a shutdown or restart reason. You enter it
into the Shut Down Windows dialog box which is displayed
as part of the shutdown sequence, or when restarting a system after a sudden
shutdown. Windows provides predefined reason options. You can also add custom
reason options. The information you provide here is recorded in the system log
in Event Viewer. To enable the feature:
Hive: HKEY_LOCAL_MACHINE
Key: Software\Microsoft\Windows\CurrentVersion\Reliability
Name: ShutdownReasonUI
Type: REG_DWORD
Value: 1=enable;0=disable