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
  • 阅读 ( 186 )
  • 分类:互联网

你可能感兴趣的文章

如何阻止windows 10在启动时重新打开上次打开的应用程序

...ows。使用下面的第一个命令关闭,第二个命令重新启动:shutdown/s/t0 shutdown/r/t0 ...

  • 发布于 2021-03-12 10:06
  • 阅读 ( 155 )

从命令行关闭linux计算机的5种方法

...box,那么简单地关闭它的解决方案就是使用通过SSH发送的shutdown指令(如果您使用的是Windows PC,那么您可以选择几个SSH工具)。这可以用于永久关闭计算机(直到您决定重新启动计算机)或重新启动计算机。命令的语法为: ...

  • 发布于 2021-03-14 17:35
  • 阅读 ( 217 )

7个简单的windows脚本,为您节省时间和精力

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

  • 发布于 2021-03-15 21:37
  • 阅读 ( 282 )

如何流蒸汽游戏树莓皮没有月光

... sudo shutdown -r now ...

  • 发布于 2021-03-21 20:59
  • 阅读 ( 307 )

您必须知道的15个windows命令提示符(cmd)命令

... windows8引入了shutdown命令,你猜到了,它可以关闭你的计算机。 ...

  • 发布于 2021-03-22 17:39
  • 阅读 ( 541 )

windows10pro与enterprise的区别是什么?

... 虽然windows10有很多版本,但大多数版本都是为特定目的而设计的,一般大众无法使用。因此,您可能会对没有摆在商店货架上的Windows版本感到困惑,比如windows10enterprise。 ...

  • 发布于 2021-03-29 05:03
  • 阅读 ( 326 )

Windows10中的chkdsk、sfc和dism有什么区别?

...电脑开始报告错误、速度减慢或行为不端时,您可以使用Windows10的内置诊断工具来尝试解决问题。CHKDSK、SFC和DISM检查硬盘的运行状况并修复损坏的文件,但这三种工具的工作方式不同,针对的系统区域也不同。 ...

  • 发布于 2021-03-30 02:33
  • 阅读 ( 368 )

如何修复windows中的双击鼠标

...此有问题,也可以按Win+R打开“运行”对话框,然后输入shutdown/R重新启动。 ...

  • 发布于 2021-03-30 20:43
  • 阅读 ( 244 )

如何在windows10上退出安全模式

... 重新启动电脑还有其他方法,例如从命令提示符下执行shutdown/r。无论您选择哪种方法,重新启动时都会提示您正常启动Windows10。 也可以在没有提示的情况下正常重启。要执行此操作,请按Windows+R打开“运行”窗口。打开后,...

  • 发布于 2021-04-01 22:32
  • 阅读 ( 324 )

如何使用命令提示符关闭windows 10 pc

...后选择“OK”按钮。 这将打开命令提示符。在此处键入shutdown/s。 按Enter键后,将出现一条消息,告诉您Windows将在不到一分钟内关闭。你可以选择“关闭”按钮,如果你喜欢,但这不会影响关机过程。 就这些。几分钟内,你的...

  • 发布于 2021-04-02 16:37
  • 阅读 ( 169 )
是可爱的苏念
是可爱的苏念

0 篇文章

相关推荐