维克斯 - 运行在安装结束一个exe(带参数),这是不是目前的MSI安装 [英] Wix - Run an exe ( with arguments ) at end of install, which wasn't installed by current MSI

查看:138
本文介绍了维克斯 - 运行在安装结束一个exe(带参数),这是不是目前的MSI安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MSI在维克斯3.6这显然是安装各种各样的事情,并创建一个快捷方式实际上并不由我的MSI(我们肯定知道exe文件位于一个特定的文件夹,因为它的安装安装一个exe创建通过一个单独的MSI,这是必需的pre-REQ我的MSI)。我们创建快捷方式,在传递一些参数,实际上告诉EXE使用我们刚刚安装的东西。这一切工作正常,但我现在想的MSI正如我们在使用快捷方式自动使用相同的参数运行exe。

I have a MSI created in WiX 3.6 that obviously installs various things and creates a shortcut to an exe that isn't actually installed by my MSI ( we know for certain that the exe is located in a specific folder, because it's installed by a seperate MSI, that is a required pre-req for my MSI ). The shortcut we create, passes in some arguments that actually tell the exe to use stuff that we've just installed. This all works fine, but I now want the MSI to automatically run the exe with the same arguments as we use in the shortcut.

我试过下面的这篇文章 - <一个href=\"http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html\" rel=\"nofollow\">http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html但它假定要运行刚安装了一个exe和似乎不使用exe文件的参数。

I tried following this article - http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html but it assumes you want to run an exe you have just installed and doesn't seem to use exe arguments.

我也尝试过使用像一个自定义操作 -

I also tried using a custom action like -

<CustomAction Id="RunMainApp"
          Directory="FREDFOLDER"
          ExeCommand="[FREDFOLDER]Fred.exe -SBDSingleApp -SBDSplash=&quot;MySplash.bmp&quot;"
          Execute="commit"
          Return="ignore"/>

<InstallExecuteSequence>
  <Custom Action="RunMainApp" Before="InstallFinalize" />
</InstallExecuteSequence>

这是更有前途 - 它运行的EXE,但这样做在实际安装之前已​​经完成 - 这显然是不正确的。

this was more promising - it ran the exe, but did so before the actual installation had finished - which obviously isn't correct.

说实话,我没那么费心,如果大鱼大肉的UI作为第一个例子 - 因为90%的时间微星将在安静模式,不被显示的向导运行

To be honest, I'm not that bothered if about having a UI as in the first example - because 90% of the time the MSI will be run in quiet mode without the wizard been displayed.

推荐答案

你有没有试图改变执行=承诺,以执行=延期,这将使自定义操作运行安装脚本运行后,但不经过安装过程完成后,对于后者你会以外的执行上下文的安装

Have you tried changing Execute="commit" to Execute="deferred", this will make the custom action run after the installation script has run, but not after the install process has completed, for the latter you would be outside of the execution context of the install.

这篇关于维克斯 - 运行在安装结束一个exe(带参数),这是不是目前的MSI安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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