Article ID: 176695 - Last Review: June 24, 2004 - Revision: 3.1 PRB: ExitWindowsEx API Does Not Reboot Windows NTThis article was previously published under Q176695 On This PageSYMPTOMS
When you use the ExitWindowsEx API to reboot the system under Windows NT and Windows 2000, the machine does not reboot.
CAUSE
In order to programmatically reboot a Windows NT or Windows 2000 system, the process requires the SE_SHUTDOWN_NAME privilege. By default, Visual Basic applications do not have this privilege and therefore will not reboot the machine.
RESOLUTION
In order to get ExitWindowsEx API to reboot the system under Windows NT or Windows 2000, the SE_SHUTDOWN_NAME privilege must be set. The following steps describe how to get the ExitWindowsEx API to work under Windows NT and Windows 2000.
Step By Step Example
STATUS
This behavior is by design.
REFERENCES
For additional information, please see the following articles in the
Microsoft Knowledge Base:
142820
(http://support.microsoft.com/kb/142820/EN-US/
)
HOWTO: Terminate Windows from a 16-Bit VB Application
76981 (http://support.microsoft.com/kb/76981/EN-US/ ) VB3: HOWTO: Terminate Windows from a Visual Basic Application 168796 (http://support.microsoft.com/kb/168796/EN-US/ ) HOWTO: Programmatically Restart or Log Off a Computer APPLIES TO
| Article Translations
|

Back to the top
