如何从我的WiX安装程序安装VS Tools For Office Runtime?I';“我得到了”;“正在等待另一个安装完成”;僵局

如何从我的WiX安装程序安装VS Tools For Office Runtime?I';“我得到了”;“正在等待另一个安装完成”;僵局,wix,windows-installer,vsto,outlook-addin,office-addins,Wix,Windows Installer,Vsto,Outlook Addin,Office Addins,我正在使用WiX为我的Office Outlook加载项编写安装程序。需要安装外接程序本身。因此,我想从我自己的WiX安装程序中将其作为自定义操作安装: <Binary Id='idBinVstorRedist' SourceFile='Sources\vstor_redist.exe' /> <CustomAction Id="idCSVstorRedist" Return="asyncWait" HideTarget="n

我正在使用WiX为我的Office Outlook加载项编写安装程序。需要安装外接程序本身。因此,我想从我自己的WiX安装程序中将其作为自定义操作安装:

<Binary Id='idBinVstorRedist' SourceFile='Sources\vstor_redist.exe' />

<CustomAction Id="idCSVstorRedist" Return="asyncWait" HideTarget="no" Execute="deferred" Impersonate="no" ExeCommand="" BinaryKey="idBinVstorRedist" />

<InstallExecuteSequence>
  <Custom Action="idCSVstorRedist" After="InstallInitialize">
    NOT Installed
  </Custom>
</InstallExecuteSequence>

未安装
其中
vstor_redist.exe本身是我的MSI包的一部分:

但当我运行安装程序时,它会在
VstorRedist
中死锁,并显示消息:“等待另一个安装完成”:


这里我做错了什么?

要检查是否安装了VSTO Office运行时,我们将添加条件和两个
RegistrySearch
元素
RegistrySearch
,完全按照名称的含义执行,它搜索目标计算机的注册表以查找特定的键和值

<Property Id="VSTORUNTIMEREDIST">
  <RegistrySearch 
    Id="VSTORuntimeRedist" 
    Root="HKLM" 
    Key="SOFTWARE\Microsoft\VSTO Runtime Setup\v4R" 
    Name="Version" 
    Type="raw" />
</Property>
<Condition 
  Message="The Visual Studio 2010 Tools for Office Runtime is not installed. 
  Please download and install from 
  http://www.microsoft.com/en-us/download/details.aspx?id=20479.">
  <![CDATA[Installed OR VSTORUNTIMEREDIST>="10.0.30319"]]>
</Condition>

="10.0.30319"]]>
在文章中阅读更多关于这方面的内容


此外,您可能会发现本文很有帮助。

这可能是因为您的自定义操作设置为在=“InstallInitialize”之后运行。我正在试运行一个批处理脚本,以在检查运行时是否存在之后安装它,并且它似乎可以像这样对我正常工作

    <InstallExecuteSequence>
  <Custom Action="RunBatch" Before="InstallFinalize"/>
</InstallExecuteSequence>
<CustomAction Id="RunBatch"
              Execute="deferred"
              Return="ignore"
              Impersonate="no"
              ExeCommand="&quot;[SystemFolder]cmd.exe&quot; /C &quot;[INSTALLFOLDER]vsto_runtime.bat&quot;"
              Directory="INSTALLFOLDER"/>

这不是安装先决条件的推荐方法,但在创建捆绑包时遇到问题后,这对我来说是一个短期解决方案


希望这对你有所帮助。

嗯。我不确定这是我想要的。您的代码显示了如果未安装VSTO运行时,如何为最终用户显示错误。我在问如何安装它。至于“如何使用WiX部署VSTO 3.0加载项”链接——很抱歉,我可能没有关注它,但它在哪里显示了如何在其中安装VSTO运行时?