/shutdown_Windows中“ shutdown / r”和“ shutdown / g”有什么区别?

/shutdown

/shutdown

what-is-the-difference-between-shutdown-r-and-shutdown-g-in-windows-00

When you start digging into all the options available in Windows, you just might be surprised at what you can find. Take the shutdown /r and shutdown /g commands, for example. What is the difference between them? Today’s SuperUser Q&A post has the answer to a curious reader’s question.

当您开始研究Windows中可用的所有选项时,您可能会对所能找到的东西感到惊讶。 例如,使用shutdown /rshutdown /g命令。 它们之间有什么区别? 今天的“超级用户问答”帖子回答了一个好奇的读者的问题。

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。

问题 (The Question)

SuperUser reader gate_engineer wants to know what the difference between “shutdown /r” and “shutdown /g” in Windows is:

超级用户阅读器gate_engineer想知道Windows中“ shutdown / r”和“ shutdown / g”之间的区别是:

I was reading through some of the options for the shutdown command in Windows when I stumbled across the following option descriptions:

偶然发现以下选项描述时,我正在阅读Windows中的shutdown命令的一些选项:

what-is-the-difference-between-shutdown-r-and-shutdown-g-in-windows-01

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:

我以为Windows重新启动时,在关闭过程中将关闭每个应用程序,然后在系统启动后再次启动。 我想到的一些可能性是:

  • A holdover from previous versions of Windows that performed some type of restart trickery

    Windows早期版本的保留,执行了某种类型的重新启动技巧
  • A temporary override of the system configuration’s default behavior

    临时覆盖系统配置的默认行为

Is it either of these or something completely different?

是这些还是完全不同的东西?

What is the difference between “shutdown /r” and “shutdown /g” in Windows?

Windows中“ shutdown / r”和“ shutdown / g”有什么区别?

答案 (The Answer)

SuperUser contributor DavidPostill has the answer for us:

超级用户贡献者DavidPostill为我们提供了答案:

What is “shutdown /g”?

什么是“关机/ g”?

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

/ g选项将重新启动使用RegisterApplicationRestart API注册为重新启动的应用程序。

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

Windows重新启动管理器(在Windows Vista中引入)支持正常关闭和重新启动使用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 applications all lined up as they were when I went to bed.

Windows Update使用此功能。 多亏有了重新启动管理器,当我早上出现在台式计算机上时(即使在系统重新启动之后),我的Outlook,浏览器,OneNote,Visual Studio和Messenger应用程序也都排好了。睡觉。

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 small 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:

假设您要在重启后启动“自动重启”所有内容。 截至几周前,我认为有必要编写一个使用Restart Manager API(即RmStartSessionRmShutdown )的小型应用程序来执行此操作。 然后让我感到震惊的是,shutdown命令必须已经对此提供了支持。 实际上,它具有:

  • shutdown /g

    关机/ g

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

来源: 重新启动Windows并重新启动所有已注册的应用程序:shutdown -g [Microsoft]



Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不错。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程

翻译自: https://www.howtogeek.com/275739/what-is-the-difference-between-shutdown-r-and-shutdown-g-in-windows/

/shutdown

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值