JSI Tip 9090. How can I create user defined reasons for the Shutdown Event Tracker?

Jerold Schulman

February 23, 2005

1 Min Read
ITPro Today logo in a gray background | ITPro Today


I first described the Shutdown Event Tracker in How can I record the reason for shutting down a Windows XP computer?

To define a custom reason code for the Shutdown Event Tracker, you must add a structured Value Name and data value to the registry at:

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionReliabilityUserDefined

For United States English, the key would be:

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionReliabilityUserDefined1033

The structured Value Names have the following syntax:

xxxxx;nnn;nnnnn

Where the semicolons delimit the Flags (xxxxx) from the Major reason (nnn) and Minor reason (nnnnn):

Flags             -  From one to five control flags, using the following character, in any order:                             P - Planned shutdown; otherwise, an unplanned shutdown.                              C - A comment is required. This flag must be used with S.                              B - An ID is required. This flag must be used with D.                              S - Display the expected shutdown dialog box. Either S, D, or both S and D must be used.                              D - Display the unexpected shutdown dialog box. Either S, D, or both S and D must be used.                                           Major reason  -  A number in the range from 64 - 255. Numbers 0 - 63 are defined by the system.Minor reason  -  A number in the range from 0 - 65535.

NOTE:  Major reason / Minor reason pairs must be unique, with the exception of planned (P) versus un-planned pairs.

The structured data values for these Value Names use the following syntax:

"<titlestring>r<descriptionstring>"

The maximum <titlestring> size is 64 characters AND it must be unique. The <descriptionstring> is optional. If present, it is displayed in the shutdown dialog box, and has a maximum size is 256 characters.



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like