Im Currently working on an ApplicationLauncher / Autoupdater. So for installing/updating an app to "Program Files", i need to request Administrator rights.
Well, since the Updater only needs to write something if new Versions are found, i tried to only request the privilegs, if a new Version is found.
The updater is executed everytime, before the application launches, so asking "everytime" for Adminrights is no solution...
I searched a lot, and found the following:
[PrincipalPermission(SecurityAction.Demand, Role = @"Administrators")]
private void InstallOrUpdate(AppItem appItem)
but wenn i try to this, the updater throws a SecurityException...
Request for principal permission failed.
What am i doing wrong?
Best regards, dognose