2

I am using jpackage to create .msi installers for a Java application. The generated .msi files work fine, but I would like for the installer to automatically launch the generated application at the end of the installation. I'm keeping the user experience as seamless as possible, and don't want to offer a user interface - just launch the app when it's ready.

I found this answer: Run exe after msi installation? ... but the script fails when I run the command on the installer with [object Error] message. I've tried a few tweaks, and the script does appear to be able to open the .msi database successfully, but it's not quite the right set of commands for some reason.

An example of the .msi I'm starting from can be found at:

https://github.com/wiverson/maven-jpackage-template/releases

... in the Windows section.

What I need is a script (similar to the EnableLaunchApplication.js posted in the other question) that works with the .msi to simply launch the installed TestApp.exe when the installer is complete. No UI, just automatically launch the app when complete. I can tweak the script as needed to add to my build environment.

The jpackage installer is generated by https://wixtoolset.org/ - jpackage creates and runs Wix to generate the .msi. I would like to just add a simple build step to tweak the generated .msi if at all possible.

Will Iverson
  • 2,009
  • 12
  • 22
  • Wondering if you ever found a solution for this. I'd like to add a confirmation message after the install but I'm not finding any way to extend/modify the wix build. – Mike Cantrell Dec 09 '21 at 16:15
  • 1
    I did, and I posted it as a comment, and for some reason it was deleted. Lame. Here is the comment again: Here is the full GitHub repo with a template solution: https://github.com/wiverson/maven-jpackage-template The specific script to modify the Wix installer is here: https://github.com/wiverson/maven-jpackage-template/blob/main/src/packaging/add-launch-to-msi.js This script may helpful for others as the basis for lots of other potential tweaks to the Windows Wix-based jpackage installers. – Will Iverson Dec 10 '21 at 17:07

0 Answers0