【发布时间】:2015-02-27 18:21:52
【问题描述】:
我正在尝试从我的 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 的正确方法吗?如有错误请指正。
【问题讨论】:
标签: installation wix windows-installer