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



The information in this article applies to:

  • Microsoft Windows Server 2003, Standard Edition
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows Server 2003, Enterprise Edition
  • Microsoft Windows Small Business Server 2003, Premium Edition
  • Microsoft Windows Small Business Server 2003, Standard Edition



Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

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 now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Windows Server 2003 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

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 Computer policy.
  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.

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
  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


Modification Type:MinorLast Reviewed:10/25/2005
Keywords:kbHotfixServer kbQFE kbBug kbfix kbQFE kbWinServ2003preSP1fix KB819760