WiX custom action - launch an application in the Target directory

I use WiX to install a specific EXE file. I want the WiX installation to finish working with the EXE file (and not leave an open window), so I use:

<CustomAction Id="LaunchApp" FileKey="APPFileKey" ExeCommand="" Return="asyncNoWait" Impersonate="no" /> 

The only problem is that it launches the application with the current directory as the place where I run MSI .

And I need this application to run where the user wants to install it - this causes me a lot of problems. Is it possible to tell WiX where to launch a custom action?

+4
source share
1 answer

You can use the CustomAction attribute directory to specify a working directory.

It does not work with FileKey, but works with ExeCommand. Instead of FileKey, you can install ExeCommand on something like "[TARGETDIR] file.exe".

+4
source

Source: https://habr.com/ru/post/1391657/


All Articles