【问题标题】:Installing vcredist x86 from msi Wix从 msi Wix 安装 vcredist x86
【发布时间】:2015-02-27 18:21:52
【问题描述】:

我正在尝试从我的 msi 安装我的程序 vcredist_x86_2008.exevcredist_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


    【解决方案1】:

    EXE 是一个自解压的 MSI。 Windows Installer 有一个互斥锁,可以防止两个并发的 MSI 事务,因此不可能让一个 MSI 调用另一个 MSI 的安装。您需要研究如何使用 WiX 的 Burn bootstrapper 来序列化两个 MSI 的安装。

    【讨论】:

    • 当前安装程序应该安装为msiexec /i file.msi PROPERTY="VALUE"。我将获得该 PROPERTYVALUE 并将其写入某个配置文件。如果我要使用 Wix Burn Boostrapper,我应该如何做同样的事情。有什么想法吗?
    • burn 的一个组件是“引导程序应用程序”。有一个“标准引导程序应用程序”,或者您可以使用本机或托管代码编写自定义应用程序。顺便说一句,这是一个新问题,应该这样发布。
    • 谢谢。首先,我想试试 Burn Boostrapper。稍后再回来讨论这个问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多