如何通过WiX执行VSTO后安装 [英] How to execute VSTO post-install by WiX

查看:108
本文介绍了如何通过WiX执行VSTO后安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装某些VSTO之后,我需要运行它们.我尝试的所有结果都是负面的.

I need to run some VSTOs after they been installed. Everything I tried came out negative.

一个例子:
<Property Id="runcmd">start</Property>

One example:
<Property Id="runcmd">start</Property>

<CustomAction Id="RunOutlookVSTO"
              Property="runcmd"
              Execute="deferred"
              Return="asyncNoWait"
              ExeCommand="[SourceDir]Outlook2010AddIn.vsto">
</CustomAction>

<InstallExecuteSequence>
  <Custom Action="RunOutlookVSTO"
          After="PublishProduct">NOT INSTALLED</Custom>
</InstallExecuteSequence>

错误:没有反应.

第二个示例:用cmd代替start
错误:没有反应.

Second example: replace start with cmd
Error: No reaction.

第三个示例:将start替换为msiexec和msiexec/i
错误:msiexec帮助屏幕和未找到任何要执行的msi"

Third example: Replace start with msiexec and msiexec /i
Error: msiexec help screen and "did not find any msi to exec"

第四个示例:<Custom action id="RunOutlookVSTO" etc>
错误:编译时不了解自定义.

Fourth example: <Custom action id="RunOutlookVSTO" etc>
Error: Does not understand custom at compile.

只是为了清楚起见,似乎有些混乱-是的,我尝试了注册表项,并且Office应用程序(Outlook,Word,Excel)将忽略它.

Seems to be a bit of a confusion, just to be clear - yes I tried the registry key, and it is being ignored by the Office applications (Outlook, Word, Excel).

<RegistryKey Action="none" Root="HKLM" Key="SOFTWARE\Microsoft\Office\14.0\User Settings\">
            <RegistryKey Id="CreateVSTOOutlook" Action="createAndRemoveOnUninstall" 
                         Key="OUR.Outlook2010AddIn\Create\Software\Microsoft\Office\Outlook\Addins\OUR.Outlook2010AddIn">
              <RegistryValue Id="CmdLineOutlook" Name="CommandLineSafe" Value="1" Type="integer"></RegistryValue>
              <RegistryValue Id="descOutlook" Name="Description" Value="Tilføjelsesprogram til Outlook 2010" Type="string"></RegistryValue>
              <RegistryValue Id="nameOutlook" Name="FriendlyName" Value="Outlook 2010 AddIn" Type="string"></RegistryValue>
              <RegistryValue Id="LoadOutlook" Name="LoadBehavior" Value="3" Type="integer"></RegistryValue>
              <RegistryValue Id="manifestOutlook" Name="Manifest" Value="[INSTALLDIR]OUR.Outlook2010AddIn.vsto|vstolocal" Type="string"></RegistryValue>
            </RegistryKey>
          </RegistryKey>

有什么想法我接下来可以尝试吗?

Any ideas what I could try next?

推荐答案

Vsto插件不是可以执行的独立程序.它们是被加载的dll,然后由各自的Office程序通过特殊的引导程序进行调用.

Vsto addins are not standalone programs you can execute. They are dll's that get loaded and then called by the respective office programs through a special bootstrapper.

如果您启动OUTLOOK,则应加载该插件(如果已正确注册).没有别的.

In your case starting OUTLOOK should load the addin (if it's registered properly). And nothing else will.

-编辑-

.vsto文件扩展名与您尝试运行的程序VstoInstaller.exe相关联.请注意,vsto文件不是程序,因此无法执行/运行.这是vstoinstaller(程序)可以理解的配置文件.

The .vsto file extension gets associated with the VstoInstaller.exe which is the program you try to run. Note that the vsto file is not a program and as such can't be executed/run. It is a configuration file that is understood by the vstoinstaller (program).

对于默认安装,可以在

C:\ Program Files \ Common Files \ microsoft共享\ VSTO \ 10.0 \ VSTOInstaller.exe

C:\Program Files\Common Files\microsoft shared\VSTO\10.0\VSTOInstaller.exe

它具有/help开关,但安装语法为:

it has a /help switch but the install syntax is:

VSTOInstaller.exe/i \服务器名\文件夹名\ AddIn.vsto

VSTOInstaller.exe /i \servername\foldername\AddIn.vsto

有关更多信息,请参见此msdn链接

for more info see this msdn link

这篇关于如何通过WiX执行VSTO后安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆