|
-
May 1st, 2000, 01:34 PM
#1
Does anyone know how to give Windows 2000/NT a "Power Button" command? I just want the computer to reboot! No questions asked! No windows shutdown! Just as if you pressed the reset button...
Any ideas?
-
May 1st, 2000, 03:44 PM
#2
Im not sure there is an API that sends a short to the reset jumper on the motherboard for the computer to restart immediatly... also if yer in NT and u reboot like that u stand a good change of screwin the OS...
if thats yer intention, i dont think windows added an API that will screw their OS like that.. (i could be wrong)
CiD -=ii=-
-
May 2nd, 2000, 12:45 AM
#3
Fanatic Member
I think there is a way
Code:
Public Declare Function ExitWindowsEx Lib "user32.dll" _
(ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Const EWX_FORCE = 4
'Force apps to quit
Const EWX_REBOOT = 2
'Perform a full reboot
'The code that makes it work:
ExitWindowsEx(EWX_REBOOT Or EWX_FORCE, 0)
Don't tell me if this is not what you want.
Just joking
Hope it helps,
Bye!
-
May 2nd, 2000, 01:10 AM
#4
PowerPoster
I'd say there's no power off -function. The fastest way to shutdown is like V(ery) Basic said with ExitWindowsEx, as I remember there's a parameter to exit without saving aso.
-
May 2nd, 2000, 02:52 AM
#5
Fanatic Member
There is a contant for poweroff, but it only works sometimes:
Code:
Const EWX_POWEROFF = 8
I just thought I'd add that
-
May 2nd, 2000, 02:55 AM
#6
Fanatic Member
I like this function beacuse if you read it it goes like this:
Exit Window Sex
Tihihihi.
I'm very infantile about these things
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|