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

CMD 指令實現倒數關機與快速關機批次檔製作教學

編輯:Win7 系統應用技巧

shutdown 指令支援排程關機/重開機。常用參數:

  • -s 關機、-r 重開機、-a 取消排程。
  • -f 強制關閉應用程式。
  • -t 秒數 設定延遲(如 3600 = 1 小時)。
  • -c "訊息" 顯示倒數提示文字。

範例

shutdown -s -f -t 3600 -c "1小時後自動關機"

製作批次檔 (.bat)

  1. 記事本輸入指令存為 shutdown_1hr.bat 放桌面,雙擊即執行。
  2. 桌面再建 cancel_shutdown.bat 內容 shutdown -a,後悔時點擊取消。

快速關機設 -t 0。善用批次檔簡化操作流程。

Copyright © Windows教程網 All Rights Reserved