我们有一个我们在 WiX 3.5.2030.0 中创作并针对 Windows Installer 4.0(用于MSIUSEREALADMINDETECTION
支持)的 MSI。我们在 MSI 中定义了一个属性来强制使用引导程序(我说“强制”,但它确实是“非常强烈地鼓励”):
<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 时嵌套是什么msiexec
。然后,我不知道为什么当客户端和服务器值正确时嵌套属性设置不正确。我该如何解决这个问题?