Windows turns off the power after it shuts down the computer if a program calls the ExitWindowsEx or the InitiateSystemShutdownEx function



Symptoms

If a program calls the ExitWindowsEx function and also uses the EWX_SHUTDOWN flag, Windows may turn off the power instead of displaying the "It is now safe to power off your computer" message as expected. This behavior also occurs if the InitiateSystemShutdownEx function is used to shut down the computer.

Note The InitiateSystemShutdownEx function can be used only if the system supports the power-off feature.

Cause

Windows Server 2003 treats the EWX_SHUTDOWN flag in the same way as the EWX_POWEROFF flag. In other words, Windows turns off the power after it shuts down the computer if the system supports the power-off feature.

Resolution

Service pack information

To resolve this problem, obtain the latest service pack for Microsoft Windows Server 2003. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
889100 How to obtain the latest service pack for Windows Server 2003

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

No prerequisites are required.

Restart requirement

You must restart your computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Windows Server 2003 32-bit versions
   Date         Time   Version            Size    File name
--------------------------------------------------------------
14-Mar-2005 18:47 5.2.3790.287 380,928 Licdll.dll
13-Mar-2005 06:50 5.2.3790.287 2,407,936 Ntkrnlmp.exe
13-Mar-2005 02:28 5.2.3790.287 2,064,896 Ntkrnlpa.exe
13-Mar-2005 03:27 5.2.3790.287 2,109,952 Ntkrpamp.exe
13-Mar-2005 06:34 5.2.3790.287 2,208,768 Ntoskrnl.exe
26-Dec-2004 21:17 1,513,002 System.adm
13-Mar-2005 07:59 5.2.3790.287 540,672 Winlogon.exe
24-Feb-2005 20:24 6.1.22.4 371,936 Updspapi.dll
Windows Server 2003 64-bit versions
   Date         Time   Version         Size       File name     Platform
---------------------------------------------------------------------
13-Mar-2005 06:17 5.2.3790.287 5,606,912 Ntkrnlmp.exe IA-64
26-Dec-2004 20:17 1,513,002 System.adm
13-Mar-2005 02:20 5.2.3790.287 639,488 Winlogon.exe IA-64
25-Feb-2005 02:52 6.1.22.4 639,712 Updspapi.dll IA-64

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
This problem was first corrected in Windows Server 2003 Service Pack 1.

More Information

Windows Server 2003

To resolve this issue in Windows Server 2003, follow these steps after you install the hotfix that is described in the "Resolution" section:
  1. Click Start, click Run, and then type gpedit.msc.
  2. Under Local Computer Policy, expand
    Computer Configuration, expand Administrative Templates, and then expand System.
  3. Double-click Do not turn off system power after a Windows system shutdown has occurred.
  4. Click the Setting tab, click
    Enabled, and then click OK.

Windows Small Business Server 2003

To resolve this issue in Windows Small Business Server 2003, follow these steps after you install the hotfix that is described in the "Resolution" section:
  1. Click Start, click Run, and then type gpmc.msc.
  2. Expand Forest and Domain Policies, and then locate the Small Business Server Client Computerpolicy.
  3. Right-click the Small Business Server Client Computer policy, and select Edit.
  4. Expand Computer Configuration, expand
    Administrative Templates, and then expand
    System.
  5. Double-click Do not turn off system power after a Windows system shutdown has occurred.
  6. Click the Setting tab, click
    Enabled, and then click OK.
Alternatively, in Windows Small Business Server 2003, you may want to apply the settings only to the server. To do this, follow these steps.

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
  1. Install the hotfix.
  2. Start Registry Editor on the server, and then locate the following registry subkey:
    HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\DontPowerOffAfterShutdown
  3. Type 1 as the REG_DWORD value.
You can also add the registry value by typing the following at a command prompt on the Windows Small Business 2003 server:
reg add HKLM\Software\Policies\Microsoft\Windows NT /v DontPowerOffAfterShutdown /t REG_DWORD /d 1 /f
Properties

Article ID: 819760 - Last Review: Feb 15, 2017 - Revision: 3

Feedback