Home
Sunday, April 23, 2017
9:53:05 PM
Users online: 0   You are here >> Home > Windows OS

Forums | Windows OS Forums search
Forum FAQ
   
  1  
Stop windows shutting down (after you pressed the button)
Electr0 
28/8/08 4:45:18 AM
Serf

*I wasn't too sure as to which section to post this under (Windows OS or Software) so I chose the one that came first.

When I was in high school, a prank that people would often play while your on the computer would be to walk past as push the power button on the front of the case, enabling the 'soft off' function. This would then start the shutdown process (as if you gone Start -> Shutdown -> Turn off computer) leaving you no time to save what you were doing and then wait for the computer to finish shutting down and re-boot. Very annoying!

However a friend and I discovered that if you opened a Word document and typed some random characters and someone then pressed the 'soft off' button a dialogue box would pop up asking you if you wanted to save the changes you had made. If you then clicked 'cancel' instead of 'yes' or 'no', then the shutdown process would stop and you could carry on working.

1. +1 to us work working out this 'easter egg' (although no doubt someone on here has discovered this before) w00t!
2. Why does this work / happen?

-----
->Then *new* weslem27 (+146 to Post Count)
->Be nice to n00bs - You were one once!
->You know, rocket science isn't actually that hard.

smadge1 
28/8/08 5:31:07 AM
Immortal

If you hadn't saved an Office document, it will ask to save before closing. Won't help you if the shutdown /f command has been used though, but it would be difficult for someone else to type that on your computer. (A network admin could probably do it though)

My computer at home I have the power settings display the shutdown dialog when the power button is pressed, it's annoying some times, but at least I can cancel it if I need to.

-----

I broke my ass in a farting accident.
I have a bag of salty nuts.

[ .. The WHS Guy .. ]

http://geocline.net/
17938

Electr0 
28/8/08 8:00:34 AM
Initiate

@ smadge1
That doesn't explain why it does it though.

-----
->Then *new* weslem27 (+146 to Post Count)
->Be nice to n00bs - You were one once!
->You know, rocket science isn't actually that hard.

SquallStrife 
28/8/08 8:13:11 AM
Titan

Well, all processes need to be stopped before the system can shut down. To accomplish this, the OS issues a "close" command to every running process, the same event that is triggered when you click the X in the top right corner. Just as if you had clicked this, the "Save before exiting?" dialog will appear if you haven't saved. Cancelling the "Save before exiting?" dialogue aborts the app's close procedure, and the shutdown can't proceed. That's all there is to it really.

This behaviour is to prevent data corruption from abruptly killing processes that have files open.

-----
Q6600 @ 3.6GHz | 8800GTS | XP x64 | Vista HP x64 | OSX 10.5.4

Quote by TinBane
The ONLY fuel saving benefit of this product, is that the car expends less energy to accelerate, because your wallet is lighter.

smadge1 
28/8/08 12:48:47 PM
Immortal

The SHUTDOWN /f command by-passes the normal close commands and kills all processes.

-----

I broke my ass in a farting accident.
I have a bag of salty nuts.

[ .. The WHS Guy .. ]

http://geocline.net/
17938

mark84 
28/8/08 3:04:18 PM
Hero
Guru


shutdown -a to abort

-----
QX9650 | HD4870 | 2x WD3000GLFS RAID0 | Swiftech Storm | 2407WFP |

AtomicMPC Firefox extension
http://tinyurl.com/2qabr7

The Truth About Graphics Power Requirements V2
http://tinyurl.com/cj3pw

Electr0 
28/8/08 6:45:55 PM
Initiate

Quote by smadge1
The SHUTDOWN /f command by-passes the normal close commands and kills all processes.


Yes but that is not what happens when you press the 'power' button. But thanks for pointing that out. Maybe i should create a batch file that does that then get people to open it by pointing the 'Internet Explorer' shortcut to it :)

Quote by mark84
shutdown -a to abort


But you wouldn't really have time to open up cmd and type that.

-----
->Then *new* weslem27 (+146 to Post Count)
->Be nice to n00bs - You were one once!
->You know, rocket science isn't actually that hard.

Meeko 
28/8/08 7:41:57 PM
Titan

Power Settings. Deactivate the shutdown button.

-----

eckythump 
28/8/08 11:05:59 PM
Champion

Um, what kind of fuckhead turns off someones computer while they're working?

And yeah, this is by no means an "easter egg", and it's by no means limited to MS Office.

And sure, yo ucould write that batch script and point the IE icon to it. That'd make you a prize cunt and I'd be amused to hear that your nose got broken because of it.

Your silly games could cost someone some valuable work.

-----
"Grandfather had an accident, he got burnt." "Oh no, how bad?" "Well, they don't fuck around at the crematorium."

SquallStrife 
29/8/08 12:57:15 PM
Titan

Quote by Electr0
Quote by smadge1
The SHUTDOWN /f command by-passes the normal close commands and kills all processes.


Yes but that is not what happens when you press the 'power' button. But thanks for pointing that out. Maybe i should create a batch file that does that then get people to open it by pointing the 'Internet Explorer' shortcut to it :)

Quote by mark84
shutdown -a to abort


But you wouldn't really have time to open up cmd and type that.



Shutdown -a doesn't stop a system from shutting down, it just cancels a timed shutdown.

Try it, go "shutdown /s" and you'll get the 30 second countdown. "shutdown /a" aborts this.

If Windows has already started shutting down, shutdown /a does nuzing.

-----
Q6600 @ 3.6GHz | 8800GTS | XP x64 | Vista HP x64 | OSX 10.5.4

Quote by TinBane
The ONLY fuel saving benefit of this product, is that the car expends less energy to accelerate, because your wallet is lighter.

  1  
Forums | Windows OS