I have looked at all the SO questions and a range of others, and cannot find the answer.
I have an executable to run after an installation:
<Property Id="WixShellExecTarget" Value="#filUpgrader" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="no" />
which is always run after installation (no checkbox needed)
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">1</Publish>
I have tried every option I can think to make this work (it was impersonating in a previous incarnation). Whatever I do, it seems to give me this:
Action 14:30:46: LaunchApplication.
Action start 14:30:46: LaunchApplication.
MSI (c) (38:0C) [14:30:47:026]: Invoking remote custom action. DLL: ***********\AppData\Local\Temp\MSI395.tmp, Entrypoint: WixShellExec
Action ended 14:30:47: LaunchApplication. Return value 3.
MSI (c) (38:E4) [14:30:47:111]: Note: 1: 2205 2: 3: Error
MSI (c) (38:E4) [14:30:47:123]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 2896
DEBUG: Error 2896: Executing action LaunchApplication failed.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2896. The arguments are: LaunchApplication, ,
Action ended 14:30:47: ExitDialog. Return value 3.
(I have starred out local file paths).I thought the problem was that it wanted elevated privileges, but that is not the case any more. When I run the app from the installed directory, it runs fine, without asking for admin permission or anything else.
This is starting to really annoy me. I have another installation with the same issue, but this is the more straightforward of them. If I can get this working, I should be able to sort the other one out. But I am starting to lose faith in Wix.