10

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.

1 Answer 1

8

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" /> 
Sign up to request clarification or add additional context in comments.

3 Comments

strangely, in my case it doesn't help. I have tried all exe file actions, even launching "[System32]cmd.exe" /c start "myapp.exe"
@MarcusUA It works for me in Windows 8.1 but doesn't in WinXP
@CITBL that's an old issue, so I can't remember for sure, but I think we ended up modifying app to start activated/focused. Or we created dll with CustomActions that would start app activated. I no longer have access to this code as I switch workplace.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.