My application should be started automatically after installation using javaw command start .\jre\bin\javaw.exe -arguments
I put it in a batch file, converted it into an exe file and executed it using CustomAction. So far everything went well.
Now I want to forcefully close my application during an upgrade. I've tried using WixQuietExecCmdLine, but it didn't work. Installation ended prematurely.
<Property Id="WixQuietExecCmdLine" Value=""tskill" javaw" />
<CustomAction Id="KillApplication" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="immediate" Return="check" />
I tried creating an exe file and used it in the CustomAction, but it didn't work either - the FileInUse Dialog still appeared.
<CustomAction Id="KillApplication" Execute="immediate" Return="check" FileKey="filCDFC9A9027274B4FA114589D92028E9A" ExeCommand="" />
<CustomAction Id="LaunchApplication" Execute="immediate" Return="ignore" FileKey="filBBC4F081C914C916EC5A94F19584D53E" ExeCommand="" />
<InstallExecuteSequence>
<Custom Action="KillApplication" After="InstallValidate">WIX_UPGRADE_DETECTED</Custom>
<Custom Action="LaunchApplication" After="InstallFinalize">NOT Installed AND NOT UPGRADINGPRODUCTCODE</Custom>
</InstallExecuteSequence>
The log file says, KillApplication was being executed, but my app was still running.
Did I miss something? I use Wix 3.11.