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 參數大全與應用

編輯:XP 系統基礎知識

衝擊波、震盪波病毒導致電腦強制重啟,讓人痛恨不已。能否在倒數計時時取消關機,先完成重要工作再清除病毒?答案是肯定的。

原理

Windows XP 透過 shutdown.exe(位於 Windows\System32)執行關機。病毒引發的強制重啟同樣呼叫此程式。在彈出強制關機對話框時,快速按 Win+R 開啟「執行」,輸入 shutdown.exe -a(注意有空格),按下 Enter,倒數視窗即消失,獲得喘息時間清除病毒。

shutdown.exe 關鍵參數速查表

參數功能
-a取消關機
-f強制關閉應用程式
-m \\電腦名控制遠端電腦
-i顯示圖形介面(必須為第一個參數)
-l登出目前使用者
-r關機並重啟
-t 秒數設定關機倒數計時
-c "訊息"關機對話框顯示訊息(最長 127 字元)

實用範例

  • 定時關機:at 23:00 shutdown -s(23:00 關機,預設 30 秒倒數)。
  • 倒數關機:shutdown.exe -s -t 3600(60 分鐘後關機)。
  • 取消排程:shutdown -a。
  • 圖形化設定:shutdown -i 開啟自動關機設定對話框。

在 Windows 2000 中使用 shutdown.exe

Win2K 原使用 Shell32.dll 關機。將 XP 的 shutdown.exe 複製到 Win2K 的 System32 目錄,即可在 Win2K 中同樣使用上述功能。

善用 shutdown.exe,不僅能應對病毒強制重啟,更能靈活掌控本機與遠端電腦的關機/重啟排程。

Copyright © Windows教程網 All Rights Reserved