4 Ekim 2020 Pazar

Windows shutdown komutu

Giriş
GUI'den kapatılan windows 8 elektriği kesmiyor. Sadece hibernate ediyor. USB'lerde halen elektrik olabiliyor. Sistemi tamamen kapatmak ve elektriği kesmek için bu komut kullanılabilir.

/f seçeneği
Force anlamına gelir. Açıklaması şöyle
/f Force running applications to close without forewarning users.
/s seçeneği
Açıklaması şöyle.
Generally shutdown /s does not send any "close" messages. It call one of few Win32 API functions for shutting down Windows system.

These functions in turn notify aplications about shutdown/restart event via WM_QUERYENDSESSION and WM_ENDSESSION messages.

Programs can then agree or try to prevent pending shutdown by responsing properly to WM_QUERYENDSESSION, eg. for stopping cleanly, etc.

So, in theory after issue shutdown /s command, there is some "close" messages send to all programs and you don't need doing anything special for that.
Örnek
Şöyle yaparız.
shutdown /s /f /t 0
/t seçeneği
/t 0 "now" anlamına gelir. Açıklaması şöyle.
/t xxx Set the time-out period before shutdown to xxx seconds. The valid range is 0-315360000 (10 years), with a default of 30. If the timeout period is greater than 0, the /f parameter is implied.
Eğer t değeri 0 verilirse shutdown iptal edilebilir. Açıklaması şöyle.
If you want applications to be able to cancel the shutdown, you need to use shutdown /s /t 0 instead.
Bir başka açıklama şöyle.
BUT if you specify any timeout period greater than 0, or leave the timeout unspecified (as in shutdown /s on its own), Windows will actually kill your processes without offering you the chance to intervene. Incredible as it sounds, this is true, and is even by design, as shown by the usage output from shutdown /?.





Hiç yorum yok:

Yorum Gönder