How to execute VSTO post-install by WiX

别来无恙 提交于 2019-12-25 13:14:12

问题


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

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>

Error: No reaction.

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

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

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

EDIT: 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?


回答1:


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.

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

-- EDIT --

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).

For a default installation VSTOInstaller.exe can be found in

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

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

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

for more info see this msdn link



来源:https://stackoverflow.com/questions/8431898/how-to-execute-vsto-post-install-by-wix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!