Link to home
Start Free TrialLog in
Avatar of Picazzo
PicazzoFlag for Netherlands

asked on

Windows 2003 shutdown reason codes wrong?

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 :)
ASKER CERTIFIED SOLUTION
Avatar of Michael Worsham
Michael Worsham
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Picazzo

ASKER

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