选择 Windows“安装更新并关闭”时到底会发生什么?注销选项?

发布于 2024-08-10 09:15:15 字数 332 浏览 4 评论 0原文

当更新可用并且用户从 Windows 开始菜单中选择“关机”时,会出现一个对话框,其中包含“关机”、“注销”等菜单。

出现的一个选项是

“安装更新并关机”。

问题是,当更新发生时,到底会发生什么?用户按下确定?

任务是否显示对话框资源管理器? (似乎无法通过进程监视器监视来判断,因为桌面被冻结)

我假设(但不确定)这是资源管理器,当用户按“确定”时,它会调用 ExitWindowsEx

如果是这样,问题是当用户选择“时有什么不同”安装更新并关闭”是否会向 ExitWindowsEx 发送特殊标志或者调用另一个 API,是否有任何方法可以监视此功能?

When updates are available and the user selects Shut Down from the Windows start menu, a dialog appears with a menu for Shutdown, Log Off etc.

One option which appears is

"Install Updates And Shut Down"

The question is, what exactly happens when the user presses OK?

Is the task showing the dialog Explorer? (It seems impossible to tell with process monitor spying, because the desktop is frozen)

I assume (But am not sure) this is Explorer and when the user presses OK it calls ExitWindowsEx

If So the question is what is different when the user selects "Install Updates And Shut Down" would it send special flags to ExitWindowsEx or perhaps call another API and would there be any way to spy this functionality?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

花开雨落又逢春i 2024-08-17 09:15:15

当用户单击“确定”时,它会注销每个连接的用户,然后安装所有待处理的更新。更新安装过程不在资源管理器中执行。我认为它在 WinLogon 下执行,可能通过 Winlogon 通知执行包。我不知道哪个系统调用会自动触发此行为...

但是,您可以查看 Windows Update Agent API,它应该允许您以编程方式控制自动更新。

when the user clicks "ok", it logs out every connected user then it installs all pending updates. the update installation process does not execute in explorer. i think it executes under WinLogon, maybe through a Winlogon notification package. i don't know which system call would trigger this behaviour automatically...

however, you can have a look at the Windows Update Agent API which should allow you to control automatic updates programmatically.

瑕疵 2024-08-17 09:15:15

我只是抛出一些想法..

也许它会在重新启动之前在此注册表项中添加一个条目: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

另请检查注册表项 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\ 中的值 ShutdownFlags当前版本\Winlogon

Im just throwing out some thoughts..

Maybe it puts an entry in this registry key before restarting: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

Also check out the value ShutdownFlags in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文