Reputation: 43
I have added a custom action using WixShellExec to open the log file after the finish dialog. Everything seems fine but the log file is displayed in the background. Is there any way to bring the log file to the top?
The Custom Action is:
<Property Id="WixShellExecTarget" Value="[MsiLogFileLocation]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA"
DllEntry="WixShellExec" Impersonate="yes" Return="check" />
I also tried using the custom action in the post 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 but i can't find the FileKey attribute value for the Log file. Does anyone know it's value? Thanks in advance.
Upvotes: 1
Views: 1300
Reputation: 35866
The solution in the linked question won't work because your target is not an executable. You need to use ShellExecute to open the "document" with the default editor registered on the machine.
Managing the a-order of Windows is restrictive. Windows has made changes over the years to minimize the ability of applications to "pop to the top" and disrupt the user. In general, the best way to transfer z-order from one application (your install) to another (your log viewer) is to have a user action do it. That means try to schedule your custom action from a button click.
Good luck!
Upvotes: 4