Windows 2003 shutdown reason codes wrong?

Posted on 2007-10-01
Last Modified: 2008-01-09
I'm trying to give valid shutdown codes using shutdown.exe on a Windows 2003 Server for shutting down because of an environment issue (Major 6, Minor 12 according to the help)
i'm using the following command:
shutdown.exe /s /m \\server1 /t 15 /d 6:12 /c "UPS failure"

Now when I look in the event log, I get the following entry:
The process winlogon.exe has initiated the power off of computer server1 on behalf of user SERVER1\Administrator for the following reason: No title for this reason could be found
 Reason Code: 0x406000c
 Shutdown Type: power off
 Comment: UPS failure

Any idea how I can get the reason to display Power Failure: Environment, as the documentation states? It appears that the Reason code adds an additional 0x04, but I have no idea where that comes from.

Any suggestions welcome :)
Question by:Picazzo
    LVL 29

    Accepted Solution

    Don't have much experience with reason codes, but I did find this article:

    You can also define your own shutdown reasons and add them to the registry. Each reason code should be stored as a registry value in the following key:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability\UserDefined\<default_system_language_ID>

    This key contains value names of the following form: xxxxx;nnn;nnnnn. The semicolons delimit the components of a value name.

    Author Comment

    It appears that not all reason codes that are listed can be used by the shutdown command, as other codes work ok. (No idea why they list them then...)
    Anyway, I've decided to go for the custom reason codes, which do work.

    Thanks for the link

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    I guess it is not common knowledge to most Wintel engineers/administrators: If you have an SNMP-based monitoring system in your environment (and it's common to have SNMP or Syslog) it's reasonably easy to enable monitoring of the Windows Event logs,…
    This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now