Microsoft KB Archive/325186

= PRB: System Shutdown Is Blocked While Awaiting User Input in Console Session =

Article ID: 325186

Article Last Modified on 11/21/2006

-

APPLIES TO

 Microsoft Win32 Application Programming Interface, when used with:  Microsoft Windows 2000 Standard Edition

 Microsoft Windows XP Professional

 Microsoft Windows Server 2003, Standard Edition (32-bit x86) 

-

<div class="notice_section">

This article was previously published under Q325186

<div class="symptoms_section">

SYMPTOMS
When a system shutdown operation is initiated by means of the Win32 ExitWindowsEx function, the InitiateSystemShutdown function, or the InitiateSystemShutdownEx function, the caller must specify whether programs with unsaved changes are to be forcibly closed.

If the caller chooses not to force these programs to close, and a program with unsaved changes is running on the console session, the shutdown process does not complete until after the user who is logged onto the console session aborts the shutdown, saves changes, closes the program, or forces the program to close. During this time period, only the console user can abort the shutdown, and you cannot initiate another shutdown operation.

<div class="cause_section">

CAUSE
While programs with unsaved changes are waiting for the response of the user in the console session, the system does not accept incoming shutdown requests.

<div class="resolution_section">

RESOLUTION
To prevent this situation, call the system shutdown functions with the force flag.

NOTE: Using the force flag may result in loss of unsaved changes in programs that are open.

<div class="status_section">

STATUS
This behavior is by design.

<div class="moreinformation_section">

Steps to Reproduce the Behavior

 * 1) Log on to the console session, open Notepad or a similar program, and then type some text without saving the file.
 * 2) Initiate a system shutdown by means of the Start menu, and do not save, discard, or cancel the text in Notepad.
 * 3) After a short delay, the End Program dialog box appears. Do not click the button to end the program.

Attempts to initiate a new shutdown do not succeed until after you close the End Program dialog box or the Notepad dialog box about saving changes.

<div class="references_section">