我们有一个MSI在Wix 3.5.2030.0中撰写,并定位Windows Installer 4.0(用于 MSIUSEREALADMINDETECTION 支持)。我们有一个在MSI中定义的属性来强制使用Bootstrapper(我说“执行”,但这确实是“非常强烈的鼓励”):

<Property Id="SETUPEXE"
          Secure="yes" />
<Condition Message="You must run the MSI through the setup program; you cannot run it directly.">
  SETUPEXE = 1
</Condition>

当我们运行生产的MSI作为新安装时,一切都可以。但是,当我们以升级为单位时,将属性传递给安装程序的属性似乎在某个时候被“丢失”。日志显示以下相关条目:

MSI (s) (2C:8C) [11:27:41:648]: Command Line: SETUPEXE=1 <other properties>

MSI (s) (2C:8C) [11:27:43:055]: PROPERTY CHANGE: Adding SETUPEXE property. Its value is '1'.

MSI (s) (2C:CC) [11:28:11:038]: PROPERTY CHANGE: Adding NETFRAMEWORK20INSTALLROOTDIR property. Its value is 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\'.
Action ended 11:28:11: AppSearch. Return value 1.
MSI (s) (2C:CC) [11:28:11:147]: Doing action: LaunchConditions
Action start 11:28:11: LaunchConditions.
MSI (s) (2C:CC) [11:28:33:662]: Product: <product> -- You must run the MSI through the setup program; you cannot run it directly.

Action ended 11:28:33: LaunchConditions. Return value 3.
Action ended 11:28:33: INSTALL. Return value 3.

Property(N): SETUPEXE = 0

Property(N): SecureCustomProperties = NETFRAMEWORK20INSTALLROOTDIR;NETFRAMEWORK35;NETFRAMEWORK35_SP_LEVEL;NEWERVERSIONDETECTED;OLDERVERSIONBEINGUPGRADED;SETUPEXE

Property(S): SecureCustomProperties = NETFRAMEWORK20INSTALLROOTDIR;NETFRAMEWORK35;NETFRAMEWORK35_SP_LEVEL;NEWERVERSIONDETECTED;OLDERVERSIONBEINGUPGRADED;SETUPEXE

Property(S): SETUPEXE = 1

我已经对此进行了一些搜索,并查看了登录 WiLogUtl 至少已经弄清楚 Property(N) 指示“嵌套”属性,但我不知道直接通过MSI运行MSI时的嵌套是什么 msiexec. 。然后,我不知道为什么在客户端和服务器值正确时未正确设置嵌套属性。我该如何解决?

有帮助吗?

解决方案

我会考虑将该条件更改为(或根据您的用例类似)

<Condition Message="Blah blah blah">SETUPEXE or Installed</Condition> 

我做了类似的事情(installshield setup.exe默认情况下会通过setupexedir属性),如果要确保您的安装程序通过Boottrapper运行以确保Prereqs有机会安装机会,这不是一件可怕的事情。但是对于维护 /维修 /卸载方案,您可能不想要求运行设置。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top