Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans Deploy JavaFX App Admin Rights

How can I deploy a JavaFX application for Windows so that the exe containing my jar launches with admin rights? I had this working with my old method of deployment, but the Netbeans way seems much easier and more efficient so I would really like to use it. It helps eliminate a lot of extra steps that I normally need to do...

I'm sure the solution is right under my nose, but I just can't seem to figure it out!

Best regards,

Alen

like image 227
Alen Avatar asked Sep 23 '14 11:09

Alen


1 Answers

After submitting the bounty I may have an answer for you : If you know how to use a custom INNO script with the JavaFX bundler, you can use a custom INNO script and add an entry to the registry that will force the application to run elevated :

[Registry]
Root: HKCU; Subkey: "Software\Microsoft\Windows NT\CurrentVersion\Appcompatflags\layers"; ValueType: string; ValueName: "{app}\File Name.exe"; ValueData: "RUNASADMIN";

This is NOT ideal (to me, anyway), but the most important thing is that it WORKS.

If you need more clarification on it please let me know and I can walk you through it.

like image 112
Will Avatar answered Sep 18 '22 14:09

Will