Mac running as administrator

41 views
Skip to first unread message

Josie

unread,
Aug 20, 2021, 4:36:23 AM8/20/21
to izpack-user

Hello,
I have been trying to have my installer on mac run with elevated permissions but it shows a popup saying to run as  administrator. I want to have it launch as  administrator without having to sudo within a console to run but to have a popup asking for permission.

I tried using osascript running a shell script to run the jar "with administrator privileges" but it attempts to run a console only version instead of the gui. If I run using sudo and without the "with administrator privileges" it works fine to install.

Doesn't work
osascript -e "do shell script \"java -jar test.jar\" with administrator privileges"

Works
osascript -e "do shell script \"sudo java -jar test.jar\""

Is there something I can add/change to the install.xml or within the izpack source code itself to not allow a console implementation to be attempted. Or another way of being able to have an executable on mac similar to the osascript I have within a unix executable to elevate permissions using a popup to launch the gui?

Much Appreciated,
Josie

Federico Tomassetti

unread,
Feb 23, 2022, 3:33:23 AM2/23/22
to izpack-user
I would also be very interested in getting an answer on this one
Reply all
Reply to author
Forward
0 new messages