jpackage - windows - don't need admin rights

128 views Asked by At

I would like to create an exe from a java application. I use jpackage to create the exe because I need java to be embedded. I'd like that admin rights not to be required during installation.

The solution would be to install the software in the /AppData/myapp directory. According to the jpackage documentation, the install-dir option should allow me to do this.

--install-dir <directory path> Absolute path of the installation directory of the application (on macos or linux), or relative sub-path of the installation directory such as "Program Files" or "AppData" (on Windows)

When I try to create an exe with this option, it always starts from programmes files as the default folder. I use the following command line to create my exe.

jpackage --main-jar app.jar --main-class org.springframework.boot.loader.JarLauncher --input ./app-jar/target --install-dir app --win-console --name app --install-dir AppData/myapp

If someone could help me with a solution to this problem, thank you.

0

There are 0 answers