windows 7 - Faster shutdown or restart than holding the power button and its drawbacks

07
2014-07
  • jb1

    I am looking for a way how to turn off a laptop with Windows 7 very fast. Fastest way I know of is holding power button for 5 seconds. It is unsatisfying because it is long time and because I need to open the lid of the laptop Unplugging the power would be faster on a desktop computer. Unfortunately my laptop bad design doesn't allow me to remove battery fast enough. (Actually the batery can't be remved at all.)

    I know about some adverse effects of turning the computer off this way. So I summarize what I care and don't care about: Some programs could have problems - I don't care. I am not sure if the file system of windows partition could get corrupted. - But I don't care. I am willing to format the partition and reinstall windows and all software if necessary.

    On the second partition of the same drive and on the second drive I have data I care about. I need to make sure they wont get corrupted and I want to keep them usable (after reinstalling windows if neccecary). I hope it will be enough to not write anything to these partitions at the time of shutdown or that it will be enough to turn off applications using my data. Is it true? Or is it necessary to turn off some caching?

    Another thing I care about is lifetime of my hardware. Can this fast turning off have some adverse effects? And how do I avoid them?

    My windows is on SSD drive. I expect that the hardware of SSD won't have problems. Is it true? My data are are on HDD drive. Would it be safer to also ensure that any program ins't reading from the drive? Can I enforce somehow that the head will be parked and that it won't harm anything? (And what about other computer hardware configurations and operating systems? Are there any differences?)

    And now questions about speed?

    How Can I make it even faster and can I make a script or keyboard shortcut which will turn off or restart the computer this forceful way?

    I have tried the application NotMyFault which makes the computer crash. (But it takes about 5 seconds, the computer restarts after crashing(I don't know how to reconfigure it to turninh off) and it isn't console application so I don't know how to script it and associate it with keyboard shortcut).

    I also tried shutdown command and psshutdown from windows sysinternals but neighter looks like it could provide me the functionality I wan't (which is doing it forcefully instead of slowly killing processes).

  • Answers
  • mtak

    Interesting question. To answer some of your questions:

    On the second partition of the same drive and on the second drive I have data I care about. I need to make sure they wont get corrupted and I want to keep them usable (after reinstalling windows if neccecary). I hope it will be enough to not write anything to these partitions at the time of shutdown or that it will be enough to turn off applications using my data. Is it true? Or is it necessary to turn off some caching?

    You would do well to turn off caching, because there is less risk that vital changes would be left in RAM at powerdown. If you want to be really sure the filesystem doesn't get corrupted you would have to unmount the disk.

    Another thing I care about is lifetime of my hardware. Can this fast turning off have some adverse effects? And how do I avoid them?

    I am not an expert on motherboard design or ACPI, but I don't see why powering off would cause any harm to your hardware.

    Would it be safer to also ensure that any program ins't reading from the drive?

    Yes, see my previous comment about changes in RAM

    Can I enforce somehow that the head will be parked and that it won't harm anything?

    Modern harddisks have a mechanism that automatically parks the head if there is a power loss.

    (And what about other computer hardware configurations and operating systems? Are there any differences?)

    At the lower levels, OS design is pretty similar. I don't think this would differ between OS'es.

    How Can I make it even faster and can I make a script or keyboard shortcut which will turn off or restart the computer this forceful way?

    AFAIK there is no Windows API to turn off the power immediately (there are API's for graceful shutdown). I guess you would have to implement an ACPI driver or something that interacts with your current ACPI driver yourself (here's an intro: MSDN)

  • LPChip

    Let me first answer the problems.

    The concequences

    If windows or a program writes to any data (doesn't matter what or where) and you cut the power/force shutdown, that file will get corrupted, period.

    If this data is on your second drive that is secure, you will loose that data. If the data is a windows file that is important, chances are windows will not boot a second time.

    Shutdown options

    Any software form of shutting down will close all programs to then stop windows. The pro of this is that it will ensure data will not go corrupted.

    The other option is the powerbutton. Pressing it once shortly will issue a soft shutdown, which basically is the same as start->shutdown->shutdown. Holding it for 5 seconds is a hard shutdown which overrules everything. If that is not an option, remove the battery from the laptop and either unplug the powercable, or make modifications to it and add a hardware switch that you can push to make it lose power. The pro of this is that its very quick, the con is that data corruption is a high risk. Also windows will complain about a windows that wasn't shutdown properly.


  • Related Question

    How to completely disable windows shutdown or restart in XP
  • Moorage

    I have seen that quite a number of times that my windows gets restarted automatically. I don't know the reason.

    Is there any way that i can completely disable windows shutdown or restart so that no software or system command can restart or shutdown my system.

    Even i should also be not able to restart it.

    Only way to turn off is direct power OFF.

    Is it possible


  • Related Answers
  • baraboom

    Windows will restart automatically for a couple of different reasons:

    1) Your software update settings might be configured to automatically install updates, in which case it will reboot to finish them. This support document from Microsoft details how to configure the settings: http://support.microsoft.com/kb/306525

    2) When Windows crashes, there is a setting that will automatically restart the system so the user is spared the Blue Screen of Death (BSOD). A quick google turned up this link, http://www.trishtech.com/winxp/disable_automatic_restart.php, but there are many others just like it.

    3) As for preventing yourself from rebooting the computer manually, there is a way to set up a "Group Policy" with restrictive security settings. You can learn more here: http://www.addictivetips.com/windows-tips/how-to-disable-remove-shutdown-from-windows-xp-and-vista/, but I would recommend against this as it is not a trivial thing to configure AND why would you want to lock yourself out of your own computer?

    Anyway, hope these links help and good luck!

  • slotishtype

    I think this is because of Windows automatic updates. To disable restart after a windows update follow the instructions from here.