如何防止 Windows 在重新启动之前执行安装? [英] How do I prevent Windows from performing installations until a reboot occurs?

查看:67
本文介绍了如何防止 Windows 在重新启动之前执行安装?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试安装脚本,并且必须将 Windows 置于等待其他安装重新启动的状态.我已阅读如何测试是否需要重新启动.设置需求的适当方式尚不清楚.

I am testing installation scripts and must put Windows into a state that a reboot is pending from another installation. I have read how to test whether a reboot is needed. A proper way to set the need is not clear.

推荐答案

诚实的回答:我不确定.有许多不同的注册表位置表明需要重新启动.我只是想在这里制作一个临时列表:如何在 Burn (WiX) 中引用 Reboot Pending 属性.我不确定使用它们的机制是什么,但其中一些重启条目可能会导致进一步安装被阻止.

The honest answer: I don't know for sure. There are a lot of different registry locations that indicate that a reboot is necessary. I just tried to make an ad-hoc list here: How do I reference the Reboot Pending Property in Burn (WiX). I am not sure what mechanism uses them all, but some of these reboot entries could conceivably cause further installs to be blocked.

如您所知,某些 Windows 更新 可以安排重新启动提示,这些提示不会停止或消失,并且不允许安装更多软件(至少不是 Windows 安装程序).我不熟悉用于触发此操作的 API - 它们可能是 Microsoft 自己的函数,只能由 TrustedInstaller(Windows 模块安装程序服务 - 用于安装 Windows 更新 - 能够替换文件)调用a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa382540(v=vs.85).aspx" rel="nofollow noreferrer">受 Windows 资源保护 ).只是一个理论.如果我明天有时间,我再看看.

As you know there are certain Windows Updates that manage to schedule reboot prompts that will not cease or go away and not allow further software to be installed (at least not Windows Installers). I am not familiar with the APIs used to trigger this - chances are they are Microsoft's own functions that can only be called by TrustedInstaller (Windows Modules Installer service - used to install Windows Updates- capable of replacing files protected by Windows Resource Protection ). Just a theory. If I get time tomorrow I will have another look.

组策略中有一些功能 通过策略禁用 Windows Installer,但如果我是你,我不会走这条路.组策略很重,它不会阻止非 MSI 安装(据我所知).我相信您已经找到了这个选项.

There are features in group policy to disable Windows Installer by policy, but I would not go down that path if I were you. Group policy is heavy stuff and it won't prevent non-MSI installs (so far as I know). I am sure you have already found this option.

看这个脚本:Get-PendingReboot-Query,SCCM 部分似乎指出了所谓的硬重启"($CCMClientSDK.IsHardRebootPending).也许某些指示重新启动的东西在重新启动之前不允许进行任何其他操作?如果您有可用的 SCCM,这是我会调查的选项. 不幸的是,我没有跟上这个问题的速度.也许在 serverfault.com 甚至 superuser.com 上试试运气吧系统管理员和高级用户潜伏着?

Looking at this script: Get-PendingReboot-Query, the SCCM section seems to indicate what is referred to as a "Hard Reboot" ($CCMClientSDK.IsHardRebootPending). Maybe something which indicates a reboot that will not allow anything else to be done before the reboot is done? If you have SCCM available this is the option I would investigate. Unfortunately I am not up to speed on the issue. Maybe try your luck on serverfault.com or even superuser.com where system administrators and power users lurk?

这篇关于如何防止 Windows 在重新启动之前执行安装?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆