为什么 Burn 会升高?
Why is Burn elevating?
为什么我的 perUser
包裹在升高?
我的连锁店里有 3 个包裹。这是一个日志片段:
[0BD8:0324][2016-10-06T15:23:57]i201: Planned package: NetFx461Web, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[0BD8:0324][2016-10-06T15:23:57]i201: Planned package: ClientMSI, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: None
[0BD8:0324][2016-10-06T15:23:57]i201: Planned package: Dummy, state: Absent, default requested: Present, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[0BD8:0324][2016-10-06T15:23:57]i299: Plan complete, result: 0x0
[0BD8:0324][2016-10-06T15:23:57]i300: Apply begin
[0BD8:0324][2016-10-06T15:23:57]i010: Launching elevated engine process.
[0BD8:0324][2016-10-06T15:24:03]i011: Launched elevated engine process.
[0BD8:0324][2016-10-06T15:24:04]i012: Connected to elevated engine.
[00B4:0B98][2016-10-06T15:24:04]i358: Pausing automatic updates.
正如您在日志中看到的,应该只安装 ClientMSI 包。这是一个 dual purpose package
:
<Property Id="ALLUSERS" Value="2" />
<Property Id="MSIINSTALLPERUSER" Value="1" />
用户可以select在我的自定义BurnUI(WPF)中如果他希望msi安装是perUser
或perMachine
。根据用户的selection,我是这样做的:
<MsiProperty Name='MSIINSTALLPERUSER' Value='1' /> <!--perUser-->
<MsiProperty Name='MSIINSTALLPERUSER' Value='' /> <!--perMachine-->
包总是被安装 perUser
(我通过添加一个我设置了 InstallScope="perUser"
的虚拟 msi 包来强制安装 perUser
。这使得包在编译时 perUser
。
如果用户 selects perUser
安装,则会安装一个软件包 (ClientMSI),即 perUser
,并且还会安装捆绑包 perUser
.没有抬高的理由!
我的猜测是 burn 假设 ClientMSI 是一个 perMachine
包,因为 ALLUSERS
被设置为 2
这会混淆 burn。有人可以确认吗?
提前感谢您的帮助!
你应该在编译包时收到这样的警告:
Bundles require a package to be either per-machine or per-user. The MSI '{0}' ALLUSERS Property is set to '2' which may change from per-user to per-machine at install time. The Bundle will assume the package is per-{1} and will not work correctly if that changes. If possible, remove the Property with Id='ALLUSERS' and use Package/@InstallScope attribute instead.
WiX 目前在编译时决定 MSI 的范围,因此 WiX 可能决定它是每台机器。
为什么我的 perUser
包裹在升高?
我的连锁店里有 3 个包裹。这是一个日志片段:
[0BD8:0324][2016-10-06T15:23:57]i201: Planned package: NetFx461Web, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[0BD8:0324][2016-10-06T15:23:57]i201: Planned package: ClientMSI, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: None
[0BD8:0324][2016-10-06T15:23:57]i201: Planned package: Dummy, state: Absent, default requested: Present, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[0BD8:0324][2016-10-06T15:23:57]i299: Plan complete, result: 0x0
[0BD8:0324][2016-10-06T15:23:57]i300: Apply begin
[0BD8:0324][2016-10-06T15:23:57]i010: Launching elevated engine process.
[0BD8:0324][2016-10-06T15:24:03]i011: Launched elevated engine process.
[0BD8:0324][2016-10-06T15:24:04]i012: Connected to elevated engine.
[00B4:0B98][2016-10-06T15:24:04]i358: Pausing automatic updates.
正如您在日志中看到的,应该只安装 ClientMSI 包。这是一个 dual purpose package
:
<Property Id="ALLUSERS" Value="2" />
<Property Id="MSIINSTALLPERUSER" Value="1" />
用户可以select在我的自定义BurnUI(WPF)中如果他希望msi安装是perUser
或perMachine
。根据用户的selection,我是这样做的:
<MsiProperty Name='MSIINSTALLPERUSER' Value='1' /> <!--perUser-->
<MsiProperty Name='MSIINSTALLPERUSER' Value='' /> <!--perMachine-->
包总是被安装 perUser
(我通过添加一个我设置了 InstallScope="perUser"
的虚拟 msi 包来强制安装 perUser
。这使得包在编译时 perUser
。
如果用户 selects perUser
安装,则会安装一个软件包 (ClientMSI),即 perUser
,并且还会安装捆绑包 perUser
.没有抬高的理由!
我的猜测是 burn 假设 ClientMSI 是一个 perMachine
包,因为 ALLUSERS
被设置为 2
这会混淆 burn。有人可以确认吗?
提前感谢您的帮助!
你应该在编译包时收到这样的警告:
Bundles require a package to be either per-machine or per-user. The MSI '{0}' ALLUSERS Property is set to '2' which may change from per-user to per-machine at install time. The Bundle will assume the package is per-{1} and will not work correctly if that changes. If possible, remove the Property with Id='ALLUSERS' and use Package/@InstallScope attribute instead.
WiX 目前在编译时决定 MSI 的范围,因此 WiX 可能决定它是每台机器。