Is shutdown.exe necessary when shutting Windows down, or is it just part of what is used to shut Windows down? Are other files and/or processes used instead? Today’s SuperUser Q&A post has the answer to a curious reader’s question.

关闭Windows时是否需要shutdown.exe,或者它只是关闭Windows的一部分吗? 是否改用其他文件和/或进程? 今天的“超级用户问答”帖子回答了一个好奇的读者的问题。

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 Mukul Kumar wants to know if shutdown.exe is necessary for shutting Windows down:

超级用户阅读器Mukul Kumar想知道关闭Windows是否需要shutdown.exe:

Is the file C:\Windows\System32\shutdown.exe necessary to shut down or restart Windows?

关闭或重新启动Windows是否需要文件C:\ Windows \ System32 \ shutdown.exe

Is shutdown.exe necessary for shutting down or restarting Windows?

关闭或重新启动Windows是否需要shutdown.exe?

答案 (The Answer)

SuperUser contributor JdeBP has the answer for us:

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

Your question of course originates from your answer at StackExchange, in particular from kinokijuf’s comment upon the initial revision of your answer.

你从你的回答在课程起源的问题StackExchange ,特别是在你的答案的初始版本kinokijuf的评论。

As kinokijuf said, Windows is not Unix. On Unices and Linux, shutdown is indeed involved in the full shut down process. It is the program that sends regular warning messages to logged-in users and that writes the /run/nologin file to prevent further logging-on a short while before the scheduled shut down time.

正如kinokijuf所说,Windows不是Unix。 在Unices和Linux上,关机确实涉及整个关机过程。 该程序会向登录的用户发送常规警告消息,并写入/ run / nologin文件,以防止在计划的关闭时间之前不久进行进一步的登录。

On Windows NT, this is not the case.

在Windows NT上不是这种情况。

The “shut down” action on the “power button” on the Windows Explorer Start menu, the “shut down” menu option in Task Manager, REBOOT /S in TCC or Take Command, and other application programs that allow you to shut the system down all initiate shut down by directly calling one of two Win32 API calls: InitiateSystemShutdownEx() or ExitWindowsEx(). They do not do things indirectly by running the shut down program. That actually needs more code to do than just calling the Win32 API call. The shut down program, when one is doing a local shut down, calls those same Win32 API calls too.

Windows资源管理器“开始”菜单上“电源按钮”上的“关闭”操作,任务管理器中的“关闭”菜单选项,TCC或Take Command中的REBOOT / S以及其他允许您关闭系统的应用程序通过直接调用以下两个Win32 API调用之一来关闭所有启动器:InitiateSystemShutdownEx()或ExitWindowsEx()。 他们不会通过运行关闭程序间接执行操作。 实际上,这不仅需要调用Win32 API调用,还需要执行更多代码。 关闭程序在进行本地关闭时也会调用相同的Win32 API调用。

It is actually winlogon, csrss, and smss that are the programs that shut down Windows NT. In particular, it is winlogon that does the main work of processing deferred shut down requests.

实际上,winlogon,csrss和smss是关闭Windows NT的程序。 特别是,winlogon负责处理延迟的关闭请求。

Further Reading

进一步阅读

  • Jonathan de Boyne Pollard (2006). The Windows NT 6 shutdown process. Frequently Given Answers.

    乔纳森·德·博伊纳·波拉德(2006)。 Windows NT 6关闭过程 。 经常给出答案。

  • Shutdown. FreeBSD 9.2 manual pages. 2013-03-19.

    关机 。 FreeBSD 9.2手册页 。 2013-03-19。

  • Shutdown. Systemd manual pages. 2013. Freedesktop.org.

    关机 。 系统手册页 。 2013。Freedesktop.org。

  • Shutdown. Upstart manual pages. 2009. Canonical Ltd.

    关机 。 新贵手册页 。 2009. Canonical Ltd.

  • InitiateSystemShutdownEx. MSDN. Microsoft corporation.

    InitiateSystemShutdownEx 。 MSDN。 微软公司。

  • ExitWindowsEx. MSDN. Microsoft corporation.

    退出WindowsEx 。 MSDN。 微软公司。

  • REBOOT. Take Command / TCC Help. JP Software.

    重新启动 。 采取命令/ TCC帮助。 JP软件。



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/185099/is-shutdown.exe-necessary-to-shut-windows-down/

要关闭Windows是否需要shutdown.exe?相关推荐

  1. 【原创】关闭Windows 7的searchIndexer.exe

    大家有没有发现在Windows 7系统中,当电脑闲置下来的时候,硬盘灯会无缘无故地不停地闪烁.打开任务管理器会发现一个名称为searchIndexer.exe的进程霸占着CPU,而且使用率居高不下-- ...

  2. 报错:此操作系统版本不支持此选项。管理员应使用“打开或关闭 Windows 功能”对话框、“服务器管理器”管理工具或 dism.exe 命令行工具安装/卸载包含 IIS8 的 ASP.NET 4.5

    现象再现: windows server 服务器的iis 应用程序池没有ASP.NET 4.5, 过程再现: 根据资料提示重新注册ASPNET_IIS.exe -i 直接提示: C:\WINDOWS\ ...

  3. Win7的定时关机功能(计划任务+shutdown.exe实现)

    Win7 本身自带的任务计划程序就可以实现丰富的定时任务功能,这里只谈论定时关机这个小功能. ①开始/所有程序/附件/系统工具/任务计划程序   打开 ②在右边的操作中选择"创建基本任务&q ...

  4. 如何用VB编程实现关闭WINDOWS窗口?

    如何用VB编程实现 关闭当前窗口的功能啊? 那位高手知道的帮帮忙啊? :我说的是 关闭当前的WINDOWS窗口 比如说我刚刚打开了一个名为ABC 的 文件夹 窗口 我现在想通过 用VB编程来实现关闭该 ...

  5. 从程序关闭Windows。

    关闭Windows 由于各种原因,您可能需要关闭Windows才能以编程方式进行. 例如,如果您的程序安装需要重新配置系统. 以下代码将通过重新启动等选项为您完成此操作. 'Module code - ...

  6. win10彻底关闭windows defender的两种方法

    很多小伙伴的电脑一般都会安装第三方杀毒软件,如360.金山等,不过Win10系统还自带了Windows Defender杀毒软件,在打开一些包含EXE文件夹的时候,Windows Defender会明 ...

  7. 服务器10的系统杀毒怎么关,Win10自带杀毒软件怎么关闭?彻底关闭Windows Defender方法...

    很多小伙伴的电脑一般都会安装第三方杀毒软件,如360.金山等,不过Win10系统还自带了Windows Defender杀毒软件,在打开一些包含EXE文件夹的时候,Windows Defender会明 ...

  8. 关闭msmpeng_关闭Windows Defender与性能提升测试

    如果在跑程序时观察过任务管理器,有时会发现占用cpu最高的除了自己运行的程序,还有一个进程叫"Antimalware Service Executable",程序名为MsMpEng ...

  9. win10家庭版调出组策略_Win10自带杀毒软件太卡?2招彻底关闭Windows Defender方法

    很多小伙伴的电脑一般都会安装第三方杀毒软件,如360.金山等,不过Win10系统还自带了Windows Defender杀毒软件,在打开一些包含EXE文件夹的时候,Windows Defender会明 ...

最新文章

  1. Caffe框架GPU与MLU计算结果不一致请问如何调试?
  2. php文件内含有隐藏的^m字符,【整理】如何取消Linux下,vi中显示的^M符号
  3. 鸿蒙系统2019发布会,直击丨2019华为开发者大会 “鸿蒙”系统今日正式发布!...
  4. php怎么运行网页_PHP的作用是什么?
  5. web.xml与index.html
  6. win2003的IIS無法使用,又一次安裝提示找不到iisadmin.mfl文件
  7. 安卓学习之路之如何显示一个listview列表视图
  8. Mybatis的基本步骤
  9. iNode客户端安装
  10. 雷达imu联合标定lidar_imu_calib-main
  11. 没有人脉如何靠内推进大厂?内推真的那么神吗?带你搞透内推到底是什么
  12. 使用 make工具在Linux系统(CentOS为例)上编译构建源码并安装的步骤(软件以diction项目为例)
  13. NX二次开发-UFUN创建圆柱UF_MODL_create_cyl1
  14. Python+Excel:批量重命名多个工作簿
  15. vue 全景图 photo-sphere-viewer 实现
  16. 程序员应该怎么学数学?
  17. OpenCV-Python (官方)中文教程(部分二)
  18. 见证历史 -- 2013 NBA 热火夺冠之路有感
  19. MyDLNote-360camera: ECCV 2020 结合室内全景图像的三维布局和深度预测
  20. mac版idea下载(亲测有效)

热门文章

  1. 几款Linux的网盘客户端
  2. iOS 9 的新特性
  3. 动态添加layui中的tab选项卡
  4. 业绩下滑、股价大跌,芯片厂商如何越过寒冬?
  5. WidsMob Denoise for Mac(图像降噪软件)
  6. 夏普手机疑似退出中国市场,富士康或全力支持诺基亚手机
  7. 字节跳动亿级DAU客户端发布实践
  8. 4.2.2 创建和编辑选区:
  9. 2021年安全员-B证考试题及安全员-B证模拟试题
  10. Apache Hadoop 2.9.2文档中文译文 -------未完!!!!!!