Using the EnableRestarts Fix
This section includes information about using the EnableRestarts compatibility fix, including the usage and API-related information.
EnableRestarts
The EnableRestarts compatibility fix addresses the issue where an application cannot restart the computer because the SeShutdownPrivilege service privilege has not been enabled. The EnableRestarts compatibility fix intercepts the ExitWindowsEx API function, verifies that the SeShutdownPrivilege service privilege exists, and then enables the privilege so that the restart can occur.
Investigating the Issue
The EnableRestarts compatibility fix addresses application-related issues where the application and computer appear to hang, because processes are unable to quit and allow the computer to restart.
Intercepted APIs
The following APIs are intercepted by the EnableRestarts compatibility fix.
API | Description |
---|---|
ExitWindowsEx |
Determines whether running applications can be terminated, logs off the current user, and then shuts down and restarts the computer. For more information, see ExitWindowsEx. |
Fixing Your Code
If your application requires the computer to restart even if the application processes do not have the appropriate permissions, the application requires the EnableRestarts fix. Except in situations where there are specific legal or business reasons to do so, you must ensure that your application processes enable the appropriate service privileges to restart, or you must modify your application to no longer require restart.