如何在 Burn (WiX) 中引用 Reboot Pending 属性 [英] How do I reference the Reboot Pending Property in Burn (WiX)

查看:33
本文介绍了如何在 Burn (WiX) 中引用 Reboot Pending 属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Burn (WiX) 引导程序中引用 RebootPending 属性?我知道属性名称是 RebootPending,它实际上引用了 Windows Installer 中的 MsiSystemRebootPending 属性.

How do I reference the RebootPending property in a Burn (WiX) bootstrapper? I know the property name is RebootPending, which is actually referencing the MsiSystemRebootPending property in Windows Installer.

我目前正在尝试这样的事情:

I'm currently trying something like this:

<bal:Condition Message="There is a restart pending. Please restart your computer before  attempting to install !(loc.ProductName).">RebootPending = 0</bal:Condition>

但这总是正确的,即使 Windows 更新刚刚完成更新并需要重新启动.

But it's always true, even when Windows Update has just finished an update and needs to restart.

我的语法错了吗?我的情况应该改为 [RebootPending] 吗?

Is my syntax wrong? Should my condition have [RebootPending] instead?

在得知 Burn 中的 RebootPending 属性可能与 Windows Installer 使用的属性不完全对应后,我还能如何确保我的应用程序在等待重启时不会尝试安装?

Having been informed that the RebootPending property inside Burn may not correspond exactly to the property that Windows Installer uses, how else would I ensure that my application does not attempt to install when a reboot is pending?

推荐答案

Burn 不使用 MSI 的 MsiSystemRebootPending,因为它在安装事务之外运行.所以 Burn 使用 ISystemInformation::RebootRequired 代替.无法保证 MSI 和 ISystemInformation::RebootRequired 关于是否需要重新启动具有相同的想法,因为 MSI 没有记录 MsiSystemRebootPending 反映.

Burn doesn't use MSI's MsiSystemRebootPending because it operates outside an installation transaction. So Burn uses ISystemInformation::RebootRequired instead. There's no guarantee that MSI and ISystemInformation::RebootRequired have the same idea about whether a reboot is required, since MSI doesn't document with MsiSystemRebootPending reflects.

这篇关于如何在 Burn (WiX) 中引用 Reboot Pending 属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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