重新啟動然後自動關閉 Windows 8

重新啟動然後自動關閉 Windows 8

可能的重複:
如何指示 Windows 8 不執行快速關機?

Windows 8 有混合關閉有一些(也許是較小的)缺點

混合關閉速度更快,所以我不想永久關閉它。

然而,當我確定我將離開固定計算機相當長的一段時間時,我想以一種完全沒有缺點的方式關閉它(除了速度慢之外,這在這種情況下並不重要) )。 (我想這也可以安裝任何待處理的 Windows 更新。)

為了澄清,我想做相當於完全重新啟動(這將刷新hyberfile),然後混合關閉(這將保存新的hyberfile,以便下次啟動很快)

我可以想到兩種可能的解決方案:

  1. 暫時切換為非「快速啟動」(啟動後自動再次開啟「快速啟動」)
  2. 進行正確的重新啟動,然後立即(無需使用者互動)關閉

有什麼方法可以自動化其中任何一個,使它們變得非常簡單(也許透過運行腳本)?

答案1

快速啟動不影響重新啟動。因此,您不必關閉該選項。

注意下面的截圖,設定開啟快速啟動,並且在描述中,重新啟動不受影響。

在此輸入影像描述

http://www.eightforums.com/tutorials/6320-fast-startup-turn-off-windows-8-a.html

筆記

快速啟動設定不適用於重新啟動。


關於重新啟動後關閉(以便下次啟動時有一個超級檔案),您可以使用以下命令運行腳本群組原則

要關閉/重新啟動窗口,您可以使用以下shutdown命令:

Usage: shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e | /o] [/hybrid]

    [/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]

    No args    Display help. This is the same as typing /?.
    /?         Display help. This is the same as not typing any options.
    /i         Display the graphical user interface (GUI).
               This must be the first option.
    /l         Log off. This cannot be used with /m or /d options.
    /s         Shutdown the computer.
    /r         Full shutdown and restart the computer.
    /g         Full shutdown and restart the computer. After the system is
               rebooted, restart any registered applications.

我不會為您編寫程式碼,但本質上,您需要兩個腳本。第一個腳本激活緩慢關閉。它需要:

  • 在某處設置一個標誌(建立一個文件)
  • 然後重新啟動

第二個腳本將會加入到群組原則中。它需要:

  • 檢查該標誌是否已設置,以及是否已設置:
    • 重置標誌(刪除檔案)
    • 關閉

設定標誌的最簡單方法可能是echo > filename.txt.

相關內容