Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WiX custom action - running application in Target directory

Tags:

wix

wix3.5

I am using WiX to install a certain EXE file. I want the WiX setup to end running the EXE file (and not leaving any window opened), so I am using:

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

The only issue is that it runs the application with current directory being the place where I run the MSI.

And I need this application to be running where the user choose to install it - it causes me many issues. Is it possible to tell WiX where to run the custom action?

like image 220
briler Avatar asked Jan 18 '12 14:01

briler


Video Answer


1 Answers

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

It doesn't work with FileKey, but it works with ExeCommand. Instead of FileKey, you can set ExeCommand to something like "[TARGETDIR]file.exe".

like image 126
rmrrm Avatar answered Oct 02 '22 23:10

rmrrm