我尝试在尝试安装程序本身之前,从我的msi安装程序 vcredist_x86_2008.exe 和 vcredist_x86_2010.exe 的依赖项。我有以下一段代码。
<Binary Id="SetupCA" SourceFile="..\..\ext_library\SetupCA\SetupCA\bin\Release\SetupCA.CA.dll"/>
<Binary Id="VCREDIST_2008_FILE" SourceFile="..\..\ext_library\vcredist_x86_2008.exe" />
<Binary Id="VCREDIST_2010_FILE" SourceFile="..\..\ext_library\vcredist_x86_2010.exe" />
<CustomAction Id="VCREDIST_2008" BinaryKey="VCREDIST_2008_FILE" ExeCommand="/q:a" Execute="immediate" Return="check" />
<CustomAction Id="VCREDIST_2010" BinaryKey="VCREDIST_2010_FILE" ExeCommand="/q /norestart" Execute="immediate" Return="check" />
<CustomAction Id="WRITEFILETODISK" Execute="immediate" BinaryKey="SetupCA" DllEntry="WriteFileToDisk" />
<CustomAction Id="ResidueRemove" Execute="immediate" BinaryKey="SetupCA" DllEntry="DeleteResidue" />
<InstallExecuteSequence>
<Custom Action="WRITEFILETODISK" Before="InstallFinalize">NOT Installed</Custom>
<Custom Action="ResidueRemove" After="InstallFinalize">Installed</Custom>
<Custom Action="VCREDIST_2008" Before="CostInitialize">NOT Installed</Custom>
<Custom Action="VCREDIST_2010" Before="CostInitialize">NOT Installed</Custom>
</InstallExecuteSequence>
我有两个其他自定义操作 WRITEFILETODISK ,它将获取传递给安装程序并在文件中写入配置的参数,以及要在卸载时运行的 ResidueRemove ,必须删除剩菜,如果有的话。使用/l*v
模式安装msi,我得到以下结果:
Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: VCREDIST_2008, location: C:\Windows\Installer\MSIA422.tmp, command: /q:a
MSI (s) (D8:30) [10:14:20:867]: Note: 1: 2205 2: 3: Error
MSI (s) (D8:30) [10:14:20:867]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1709
MSI (s) (D8:30) [10:14:20:867]: Product: LogPointAgent -- Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: VCREDIST_2008, location: C:\Windows\Installer\MSIA422.tmp, command: /q:a
这不是从msi安装另一个exe的正确方法吗?如果我错了,请纠正。
答案 0 :(得分:2)
EXE是一个自解压MSI。 Windows Installer有一个互斥锁,可以防止两个并发的MSI事务,因此不可能让一个MSI调用另一个MSI的安装。您需要研究如何使用WiX的Burn引导程序来序列化两个MSI的安装。