Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Windows 2000/XP 防強制關機終極技巧:shutdown.exe -a 緊急取消與參數完整手冊

編輯:XP 系統基礎知識

核心原理:攔截 Shutdown.exe 呼叫鏈

Windows 關機/重啟本質上均呼叫 %SystemRoot%\System32\shutdown.exe。病毒(衝擊波/震盪波)、遠端管理工具、排程工作觸發關機時,皆會啟動此程式並顯示倒數對話框。**在倒數期間執行 shutdown.exe -a 即可中止該關機序列**。

緊急取消操作(肌肉記憶級)

  1. 彈出「系統關機」倒數視窗瞬間 → Win+R 呼叫「執行」。
  2. 輸入 shutdown.exe -a(注意空格) → Enter。
  3. 倒數視窗消失,關機中止,立即掃毒/存檔。

shutdown.exe 完整參數速查表

參數功能範例
-a中止關機序列shutdown -a
-s關機shutdown -s -t 60
-r重啟shutdown -r -f -t 30
-f強制關閉應用程式(不提示儲存)常搭配 -s/-r
-m \\Computer遠端控制目標電腦shutdown -m \\PC01 -r
-i圖形介面模式(必須為第一參數)shutdown -i
-l登出目前使用者shutdown -l
-t xxx設定倒數秒數 (0-315360000)shutdown -s -t 3600 (1小時)
-c "msg"自訂對話框訊息 (最長 127 字)shutdown -r -t 60 -c "維護重啟"

進階應用場景

定時關機(無需第三方軟體)

:: 每晚 23:00 關機
at 23:00 shutdown -s -f

:: 60 分鐘後關機
shutdown -s -t 3600 -c "1小時後自動關機,請儲存工作"

遠端管理(需 RPC/ADMIN$ 開放)

shutdown -m \\SERVER01 -r -f -t 30 -c "套用補丁需重啟"

Windows 2000 相容性說明

Win2k 原生使用 rundll32.exe shell32.dll,SHExitWindowsEx。將 XP 的 shutdown.exe 複製至 Win2k %SystemRoot%\System32 即可直接使用上述所有參數。

常見誤區與防禦補充

  • 誤區:以為關閉「關機事件追蹤器」即可防強制關機 → 錯,病毒直接呼叫 API。
  • 防禦:部署 AppLocker/軟體限制原則 禁止非信任簽章的 shutdown.exe 執行;關閉不必要的 RPC (TCP 135/445) 連接埠;安裝防毒並開啟即時防護。
Copyright © Windows教程網 All Rights Reserved