Can I create a simple program to power off the windows machine immediately? I would like the behavior to be like pressing PWR OFF/RESET button. So the power is cut off immediately. Is there any way to send a software interrupt to motherboard to make this happen?
Asked
Active
Viewed 373 times
1
-
possible duplicate of [How to power down the computer from a freestanding environment?](http://stackoverflow.com/questions/3145569/how-to-power-down-the-computer-from-a-freestanding-environment) – Paul R Jun 30 '10 at 07:58
-
you might corrupt files that way – Nick Dandoulakis Jun 30 '10 at 08:04
-
@Paul R - Windows is not a freestanding environment. No dup. – MSalters Jul 01 '10 at 14:25
1 Answers
0
You can easily do this in assembly language like MASM. Here's small tutorial from Microsoft: http://support.microsoft.com/kb/68805
Also you can try to execute int 19h
assembly command.
But I'm not sure if theese methods will work under win2k and later. To get them working you should create a driver then.

lks128
- 936
- 6
- 13
-
Thank you. I've tried both C code and assembly code but it didn't work on my machine. It seems that neither I can't set bios pointer to the desired address nor I can't directly jump to the reboot address. My machine is running windows xp service pack 3. – HcTeP Jul 01 '10 at 01:04
-
1The link is for MS-DOS. Not Windows 3.11, 95, or any other Microsoft OS from the last two decades. Note that is says "Works on 8086, and some 80286/80386 machines" ! – MSalters Jul 01 '10 at 14:28