开发者

I can use WiX to launch my app at the end of install, but I can't get my app to run in the foreground

开发者 https://www.devze.com 2022-12-19 20:40 出处:网络
Using WiX, my install will optionally launch one of my installed program files when it completes. However, when my application is launched by the installer, it is usually not displayed in the foregrou

Using WiX, my install will optionally launch one of my installed program files when it completes. However, when my application is launched by the installer, it is usually not displayed in the foreground of the user's desktop. It's buried under other windows, so it's not immediately clear 开发者_运维知识库to the user that the program is running.

I've tried having my program forcibly bring itself to the top when it runs, but that hasn't changed the way it runs when started by the installer.


Found a solution for this. I changed my CustomAction definition to use 'FileKey' rather than 'BinaryKey'. I'm not sure, but I'm guessing that launching the application through a shell exec command was responsible for my application not being displayed in the foreground.

<!-- old code -->
<CustomAction Id="LaunchApp" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />

<!-- new code -->
<CustomAction Id="LaunchApp" FileKey="FooBarEXE" ExeCommand="" Return="asyncNoWait" Impersonate="yes" />
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号