windows中的“shutdown/r”和“shutdown/g”有什麼區別?

當你開始深入研究Windows中所有可用的選項時,你可能會對你能找到的東西感到驚訝。以shutdown/r和shutdown/g命令為例。它們之間有什麼區別?今天的超級使用者問答帖子回答了一位好奇的讀者的問題。...

windows中的“shutdown/r”和“shutdown/g”有什麼區別?

當你開始深入研究Windows中所有可用的選項時,你可能會對你能找到的東西感到驚訝。以shutdown/r和shutdown/g命令為例。它們之間有什麼區別?今天的超級使用者問答帖子回答了一位好奇的讀者的問題。

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,是一個由社群驅動的問答網站分組。

問題

超級使用者閱讀器gate\u engineer想知道Windows中“shutdown/r”和“shutdown/g”的區別是什麼:

I was reading through some of the opti*** for the shutdown command in Windows when I stumbled across the following option descripti***:

007Ys3FFgy1gpcrhqxeobj30hd02tweh

I thought that when Windows restarts, every application would be closed during the shutdown process, then started again after the system boots. Some possibilities that come to mind are:

  • A holdover from previous versi*** of Windows that performed some type of restart trickery
  • A temporary override of the system configuration’s default behavior

Is it either of these or something completely different?

Windows中的“shutdown/r”和“shutdown/g”有什麼區別?

答案

超級使用者貢獻者DavidPostill為我們提供了答案:

What is “shutdown /g”?

The /g option will restart applicati*** that are registered for restart with the RegisterApplicationRestart API.

The Windows Restart Manager (introduced in Windows Vista) supports gracefully shutting down and restarting applicati*** that registered for restart with the RegisterApplicationRestart API.

This functionality is used by Windows Update. Thanks to the Restart Manager, when I show up to my desktop computer yawning in the morning (even following a system restart), I have my Outlook, browser, OneNote, Visual Studio, and messenger applicati*** all lined up as they were when I went to bed.

Suppose that you want to initiate “automagically restarting” everything after a restart. As of a few weeks ago, I thought it was necessary to write a **all application that uses the Restart Manager APIs (i.e. RmStartSession and RmShutdown) to do this. And then it hit me that the shutdown command must already have support for doing this. And indeed, it has:

  • shutdown /g

Source: Restart Windows and Restart All Registered Applicati***: shutdown -g [Microsoft]


有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。

  • 發表於 2021-04-08 23:38
  • 閱讀 ( 62 )
  • 分類:網際網路

你可能感興趣的文章

如何阻止windows 10在啟動時重新開啟上次開啟的應用程式

...ows。使用下面的第一個命令關閉,第二個命令重新啟動:shutdown/s/t0 shutdown/r/t0 ...

  • 發佈於 2021-03-12 10:06
  • 閲讀 ( 38 )

棄用與刪除:有什麼區別?

... 當Windows使用者得知經典的微軟Paint將在即將到來的windows10fall Creators更新中被棄用時,他們變得憤怒起來。雖然Paint在windows7之後還沒有更新過,但人們開始爭先恐後地尋找替...

  • 發佈於 2021-03-12 23:00
  • 閲讀 ( 37 )

appdata和programdata有什麼區別?

我們最近研究了Windows中漫遊和本地AppData資料夾之間的區別。一位評論者進一步想知道AppData和ProgramData資料夾之間的區別是什麼。讓我們看看這兩個資料夾,看看它們的角色有什麼不同。 ...

  • 發佈於 2021-03-12 23:53
  • 閲讀 ( 60 )

appdata漫遊和本地漫遊有什麼區別?

如果您在Windows計算機上對檔案系統做了一些深入的研究,您可能會遇到AppData資料夾。它在預設情況下是隱藏的,所以大多數使用者不會看到它或有理由訪問它。應用程式資料的縮寫,許多程式將其資料儲存在此目錄中。 ...

  • 發佈於 2021-03-13 01:49
  • 閲讀 ( 40 )

從命令列關閉linux計算機的5種方法

...box,那麼簡單地關閉它的解決方案就是使用透過SSH傳送的shutdown指令(如果您使用的是Windows PC,那麼您可以選擇幾個SSH工具)。這可以用於永久關閉計算機(直到您決定重新啟動計算機)或重新啟動計算機。命令的語法為: ...

  • 發佈於 2021-03-14 17:35
  • 閲讀 ( 44 )

7個簡單的windows指令碼,為您節省時間和精力

... shutdown -s -t 0 ...

  • 發佈於 2021-03-15 21:37
  • 閲讀 ( 54 )

記事本和寫字板:文字編輯器有什麼區別?

大多數人認為MicrosoftWord是在Windows上鍵入文件的標準。但是你知道嗎,每個版本的Windows實際上都包含兩個基本的文字編輯工具? ...

  • 發佈於 2021-03-21 19:40
  • 閲讀 ( 39 )

32位和64位windows有什麼區別?

當您考慮Windows版本時,您可能會想到Home或Pro版本。雖然這些確實不同,但還有另一個因素將Windows版本分隔開來:系統是32位還是64位? ...

  • 發佈於 2021-03-22 08:49
  • 閲讀 ( 44 )

您必須知道的15個windows命令提示符(cmd)命令

... windows8引入了shutdown命令,你猜到了,它可以關閉你的計算機。 ...

  • 發佈於 2021-03-22 17:39
  • 閲讀 ( 46 )

Windows10中的chkdsk、sfc和dism有什麼區別?

...電腦開始報告錯誤、速度減慢或行為不端時,您可以使用Windows10的內建診斷工具來嘗試解決問題。CHKDSK、SFC和DISM檢查硬碟的執行狀況並修復損壞的檔案,但這三種工具的工作方式不同,針對的系統區域也不同。 ...

  • 發佈於 2021-03-30 02:33
  • 閲讀 ( 84 )
是可愛的蘇念
是可愛的蘇念

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章

相關推薦