Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reboot from application
Message
From
01/03/1999 13:47:43
 
 
To
01/03/1999 05:56:28
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00192576
Message ID:
00192780
Views:
27
>I try to use VB6 to reboot (cold boot) my computer thru my application by using the following statement :
>
>in module1 :
>
>' u/ windows action
>Const EWX_LOGOFF = 0
>Const EWX_SHUTDOWN = 1
>Const EWX_REBOOT = 2
>Const EWX_FORCE = 4
>Declare Function ExitWindowsEx Lib "user32" _
>(ByVal uFlags As Long, ByVal dwReserved _
>As Long) As Long
>
>in my form :
>
>Private sub cmdReboot_click()
>t = ExitWindowsEx(EWX_REBOOT, 0)
>End Sub
>
>but it does not work, it seems like I logging in with a different user
>.. please help .. thanks for any advice or suggestion
>

Try using EWX_REBOOT + EWX_FORCE; if you're using NT, you need to enable very specific user privileges to enable a complete reboot sequence from a user other than a member of the Local Administrators group.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform