« Return to Thread: Re: Bootstrap then launch with administrative rights

Re: Bootstrap then launch with administrative rights

by nik.thirtynine :: Rate this Message:

Reply to Author | View in Thread

Hi,

please forgive me if this is not posted in the correct format, but I
didn't know how to do it any better (just subscribed to this mailing
list so I don't have the original mail).

> I have made significant progress on this topic :-)
>
> On Windows Vista, the installer extracts a WSH JScript that
> relaunches a JVM with elevated privileges. I suspect that it works
> on XP too but I couldn't test it.

It works on XP but there is a pitfall. A dialog will be display where
you can choose which user account should be used to start the
application. Additionally there is a checkbox where you can whether
your computer and data should be protected from unauthorised program
activity. This is tciked on by default and if it is kept ticked on
then the installer runs into problems installing into the common
C:\Program Files folder. I am not sure if this a problem in just my
system - maybe someone else could try this out and give this a try.


> On Mac OS X, the installer extracts a very small universal binary
> that uses the Security framework, again to ask for elevation.

This is very nice :) However there is again a limitation: It seems
like your tiny app does not work correctly with shell scripts. So any
shell scripts do not inherit the privileges. This explcitly covers the
case where you tell the installer to start shell script as postinstall
(<executable>). This script will not run with the elevated rights.
Would there be any way how to make scripts run with elevated rights as
well?


> In my limited experimentations this worked well.
>
> It can be enabled through a <run-privileged/> tag in the <info>(...)</info> section.

I would suggest to add the option to make this OS-dependent. For
example my installer does not need to have privileged rights on
Windows but needs privileged rights for OSX (missing libraries which
need to be installed). This is currently not possible.


--
Best regards,
 nik.thirtynine                          mailto:nik.thirtynine



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: Re: Bootstrap then launch with administrative rights