Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Windows › A trick for super-fast shutdown: Windows turned off at once
New Posts  All Forums:Forum Nav:

A trick for super-fast shutdown: Windows turned off at once

post #1 of 17
Thread Starter 
Windows Shutdown Command

Windows provides a shutdown command (named shutdown.exe) which could be used to turn off your PC from the Windows command line. Calling this shutdown function with the appropriate parameters will start a super-fast shutdown process that won't be interrupted. The only line of code needed to shutdown Windows is as follows:

Code:
shutdown.exe -s -f -t 00
This is the explanation of the shutdown parameters:

* -s starts the Windows shutdown process in order to turn off your PC.
* -f forces exiting any running Windows process, without any warning: no blocked application will interrupt the shutdown process.
* -t 00 specifies that the shutdown process is delayed 0 seconds: Windows will be shutdown immediately.

That will quickly shutdown windows, exiting at once any program. So the shutdown process won't be stopped by any unresponsive application: with these parameters you will override any annoying "finish program not responding" Windows prompts. Just run the shutdown command and leave your PC.

On the other hand, if you still have some unsaved changes on any application, it seems that you will be given one last chance to save your progress, thanks to a "save changes?" Windows prompt. You can start this super fast shutdown process without fearing to lose any application data.


How to create a quick Windows shutdown button



Let's save even more time creating a quick Windows shutdown button. Don't type by hand the whole shutdown.exe command with those parameters: store the shutdown command line in a batch file following these 2 simple steps:

* Open your favourite text editor and paste the Windows shutdown code inside: shutdown.exe -s -f -t 00
* Save this file as a ".bat" file (for example, fast-shutdown.bat)

You have just created a super fast shutdown button: now you can quickly shutdown Windows just by double clicking your shutdown ".bat" file!

A keyboard shortcut to quickly shutdown Windows

Can you imagine an even faster whay to shutdown Windows? Well, there's still a quicker way to start this unstoppable, lightning-fast shutdown process: you could turn off your PC using a keyboard shortcut.

Once you have created a .bat file that contains the shutdown.exe command with the appropriate parameters, associating this file with a keyboard shortcut is very easy:

* Right click your .bat file and create a shortcut
* I always place this shortcut icon on my desktop, so I can quickly shutdown Windows with a double click
* Right click the recently created shortcut icon and select Properties
* Inside the shortcut tab, click on the keyboard shortcut field
* Press the keyboard shortcut that you would like to use to shutdown Windows. (As you don't want to accidentally shutdown Windows, select some complex combination that would be unused by most applications, such as CONTROL + ALT + SHIFT + F12)

And that's it!
post #2 of 17
great + rep
Gotta HAF It!
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Pentium Dual CPU E2160 EVGA nForce 780i SLI FTW EVGA GTX 260 CORSAIR XMS2 (2x2GB) 
OSPowerCase
Microsoft Vista Home Premium OCZ StealthXStream 600W CoolerMaster HAF 
  hide details  
Reply
Gotta HAF It!
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Pentium Dual CPU E2160 EVGA nForce 780i SLI FTW EVGA GTX 260 CORSAIR XMS2 (2x2GB) 
OSPowerCase
Microsoft Vista Home Premium OCZ StealthXStream 600W CoolerMaster HAF 
  hide details  
Reply
post #3 of 17
wow. thanks for this.
Herschel
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7 4770K ASRock Z87M Extreme4 eVGA GTX 680 2GB 12GB G.Skill Ripjaws 1600 
Hard DriveOptical DriveOSMonitor
1x 60GB SSD 1x 500GB, 1x 640GB, 1x 1TB Asus something or other Windows 7 Ultimate x64 Acer H236HLbid (23" 1920x1080) 
MonitorKeyboardPowerCase
Asus VE198 (19". 1440x900) Microsoft Sidewinder X4 Seasonic X650 Antec P180 Mini White 
Mouse
Logitech G500 
  hide details  
Reply
Herschel
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7 4770K ASRock Z87M Extreme4 eVGA GTX 680 2GB 12GB G.Skill Ripjaws 1600 
Hard DriveOptical DriveOSMonitor
1x 60GB SSD 1x 500GB, 1x 640GB, 1x 1TB Asus something or other Windows 7 Ultimate x64 Acer H236HLbid (23" 1920x1080) 
MonitorKeyboardPowerCase
Asus VE198 (19". 1440x900) Microsoft Sidewinder X4 Seasonic X650 Antec P180 Mini White 
Mouse
Logitech G500 
  hide details  
Reply
post #4 of 17
or you can just unplug the psu. jk

this was very fun to use in batch files during high school kiddy script battles.
easy batch file in the start up scripts = dumb people very frustrated.
post #5 of 17
nice documentation!

change the -s to a
-r to restart,
-g to restart and restart all open applications
-h hibernate
-l logoff

this could be pretty cool with some fancy icons and object/rocket dock
The Byte Mogul
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8400 E0 @ 4.0Ghz, 1.216v EP45-UD3P v1.1 XFX GTX260 2x 2GB GSkill Pi Black 
Hard DriveOSMonitorKeyboard
1x 250GB, PERC 6/i RAID5 4x F4 2TB Windows 7 Professional x64 Dell u2311h $3 Microcenter Cheap-O 
PowerCaseMouse
Antec TPN-750 CM590 Razer Deathadder 
  hide details  
Reply
The Byte Mogul
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8400 E0 @ 4.0Ghz, 1.216v EP45-UD3P v1.1 XFX GTX260 2x 2GB GSkill Pi Black 
Hard DriveOSMonitorKeyboard
1x 250GB, PERC 6/i RAID5 4x F4 2TB Windows 7 Professional x64 Dell u2311h $3 Microcenter Cheap-O 
PowerCaseMouse
Antec TPN-750 CM590 Razer Deathadder 
  hide details  
Reply
post #6 of 17
Rather than deleting this thread since it appears useful, I will just give the link from which it was stolen.

http://trebleclick.blogspot.com/2008...n-windows.html
Main Rig
(15 items)
 
  
Reply
Main Rig
(15 items)
 
  
Reply
post #7 of 17
nioce thread, not going to try it tho.
X79-GCN
(22 items)
 
  
CPUMotherboardGraphicsRAM
Intel 3930K 4.5GHz HT GIGABYTE GA-X79-UP4 AMD R9-290X GEil Evo Potenza DDR3 2400MHz CL10 (4x4GB) 
Hard DriveCoolingCoolingCooling
Samsung 840 Pro 120GB EK Supremacy (CPU) NF F12's P/P (360 Rad)  NF A14's (420 Rad)  
CoolingCoolingCoolingCooling
XSPC Chrome Compression Fittings EK RES X3 150 Primochill PremoFlex Advanced LRT Clear 1/2 ID EK-FC (R9 290X) 
CoolingCoolingCoolingOS
EK D5 Vario Top-X  Phobya G-Changer V2 360mm Phobya G-Changer V2 420mm Win 10 x64 Pro 
MonitorKeyboardPowerCase
BenQ XR3501 35" Curved Corsair Vengeance K90 Seasonic X-1250 Gold (v2) Corsair 900D 
MouseAudio
Logitech G400s Senn HD 598 
  hide details  
Reply
X79-GCN
(22 items)
 
  
CPUMotherboardGraphicsRAM
Intel 3930K 4.5GHz HT GIGABYTE GA-X79-UP4 AMD R9-290X GEil Evo Potenza DDR3 2400MHz CL10 (4x4GB) 
Hard DriveCoolingCoolingCooling
Samsung 840 Pro 120GB EK Supremacy (CPU) NF F12's P/P (360 Rad)  NF A14's (420 Rad)  
CoolingCoolingCoolingCooling
XSPC Chrome Compression Fittings EK RES X3 150 Primochill PremoFlex Advanced LRT Clear 1/2 ID EK-FC (R9 290X) 
CoolingCoolingCoolingOS
EK D5 Vario Top-X  Phobya G-Changer V2 360mm Phobya G-Changer V2 420mm Win 10 x64 Pro 
MonitorKeyboardPowerCase
BenQ XR3501 35" Curved Corsair Vengeance K90 Seasonic X-1250 Gold (v2) Corsair 900D 
MouseAudio
Logitech G400s Senn HD 598 
  hide details  
Reply
post #8 of 17
I've had this for a while but never thought to post it here, good idea! My current bat file should consists of this:

cls
c:\\windows\\system32\\shutdown.exe -s -t 00 -f
stop
post #9 of 17
I don't want to be out a place here but how does OP have more Unique Rep than Regular Rep?

I see 4 Rep and 13 Unique.
Edited by Zoki318 - 2/20/09 at 8:17am
1.21 Gigawatts
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 2.8GHz EVGA 680i LT SLI 2X EVGA 9800GTX+ SSC SLI OCZ Reaper HPC 8GB (4x2GB) 
Hard DriveOptical DriveOSMonitor
2X 750GB HDD w/ 32MB cache PLEXTOR DVD±R, PHILIPS DVD±R Windows Vista Ultimate x64 Samsung 2333SW 
KeyboardPowerCaseMouse
Logitech Wave Combo OCZ GameXStream 700W PSU CM Ammo 533 Logitech Wave Combo 
Mouse Pad
Something from 1996 
  hide details  
Reply
1.21 Gigawatts
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 2.8GHz EVGA 680i LT SLI 2X EVGA 9800GTX+ SSC SLI OCZ Reaper HPC 8GB (4x2GB) 
Hard DriveOptical DriveOSMonitor
2X 750GB HDD w/ 32MB cache PLEXTOR DVD±R, PHILIPS DVD±R Windows Vista Ultimate x64 Samsung 2333SW 
KeyboardPowerCaseMouse
Logitech Wave Combo OCZ GameXStream 700W PSU CM Ammo 533 Logitech Wave Combo 
Mouse Pad
Something from 1996 
  hide details  
Reply
post #10 of 17
Quote:
Originally Posted by Zoki318 View Post
I don't want to be out a place here but how does OP have more Unique Rep than Regular Rep?
reps removed cause it's copy/pasted from another site?
"The Fridge"
(15 items)
 
  
CPUMotherboardGraphicsRAM
Intel i7 4770k (lapped and delidded) ASUS Maximus VII Hero Geforce GTX Titan X Corsair Vengeance 16GB  
Hard DriveOptical DriveCoolingOS
Samsung EVO 256GB SSD None Corsair H100i Windows 7 
MonitorKeyboardPowerCase
ASUS VS239 Corsair RGB K70 Corsair AX860 NZXT H440 
MouseMouse PadAudio
Corsair M65  Custom 2mm Teflon Onboard SupremeFX 
  hide details  
Reply
"The Fridge"
(15 items)
 
  
CPUMotherboardGraphicsRAM
Intel i7 4770k (lapped and delidded) ASUS Maximus VII Hero Geforce GTX Titan X Corsair Vengeance 16GB  
Hard DriveOptical DriveCoolingOS
Samsung EVO 256GB SSD None Corsair H100i Windows 7 
MonitorKeyboardPowerCase
ASUS VS239 Corsair RGB K70 Corsair AX860 NZXT H440 
MouseMouse PadAudio
Corsair M65  Custom 2mm Teflon Onboard SupremeFX 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Windows
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Windows › A trick for super-fast shutdown: Windows turned off at once