如何通过 WiX 执行 VSTO 安装后
我需要在安装一些 VSTO 后运行它们。我尝试的一切结果都是负面的。
一个例子:
<CustomAction Id="RunOutlookVSTO"
Property="runcmd"
Execute="deferred"
Return="asyncNoWait"
ExeCommand="[SourceDir]Outlook2010AddIn.vsto">
</CustomAction>
<InstallExecuteSequence>
<Custom Action="RunOutlookVSTO"
After="PublishProduct">NOT INSTALLED</Custom>
</InstallExecuteSequence>
错误:无反应。
第二个示例:将 start 替换为 cmd
错误:无反应。
第三个示例:将 start 替换为 msiexec 和 msiexec /i
错误:msiexec 帮助屏幕和“未找到任何要执行的 msi”
第四个示例:<自定义操作 id="RunOutlookVSTO" 等>
错误:编译时不理解自定义。
编辑: 似乎有点混乱,需要澄清的是 - 是的,我尝试了注册表项,但 Office 应用程序(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>
有什么想法我接下来可以尝试吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Vsto 插件不是可以执行的独立程序。它们是由各自的 Office 程序通过特殊的引导程序加载和调用的 dll。
在您的情况下,启动 OUTLOOK 应该加载插件(如果它注册正确)。其他什么也不会。
-- 编辑 --
.vsto 文件扩展名与 VstoInstaller.exe 关联,这是您尝试运行的程序。请注意,vsto 文件不是程序,因此无法执行/运行。它是 vstoinstaller(程序)可以理解的配置文件。
对于默认安装,VSTOInstaller.exe 可以在以下位置找到
它有一个 /help 开关,但安装语法是:
有关详细信息,请参阅 此 msdn链接
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
it has a /help switch but the install syntax is:
for more info see this msdn link