安装后启动应用程序

Pea*_*lyk 20 wix

我搜索了一下,发现了一些话题

http://wix.sourceforge.net/manual-wix3/run_program_after_install.htm

安装完成后启动应用程序,打开UAC

但是,我不使用任何ui.只需简单的安装!至今

<CustomAction Id="LaunchApp" Directory="INSTALLDIR" ExeCommand="[SystemFolder]cmd.exe /C MyExe.exe" />

<InstallExecuteSequence>
      <RemoveExistingProducts Before="InstallInitialize" /> 
      <Custom Action="LaunchApp" After="InstallFinalize" />
    </InstallExecuteSequence>
Run Code Online (Sandbox Code Playgroud)

但是当我启动安装程序时,会弹出一个窗口:"请等待Windows配置MyProgram".在它上面只有一个闪烁的光标cmd.exe,当我关闭cmd时,我收到消息:"这个Windows Installer程序包有问题.无法运行此安装完成所需的程序." 虽然计划仍然开放.我怎样才能正确地做到这一点(没有任何UI)?提前致谢!

Ant*_*nyW 15

如果你使用会发生什么

ExeCommand="[SystemFolder]cmd.exe /C start MyExe.exe"
Run Code Online (Sandbox Code Playgroud)


Cos*_*rvu 5

为自定义操作设置Return to asyncNoWait.这样自定义操作就会运行,安装程序不会等待它或检查其返回代码.