How to force a Win app to start with admin privileges ?


I’m using the RegistryItem class to write into the Windows registry database. This requires the software being started with administrator privileges, which could be done by using the app’s context menu or adjusting compatibility settings. But both ways are not very intuitive for the average user.

Is there a way to “force” (or ask nicely :wink: a Windows app starting with admin privileges programmatically ?

Thank you,


You may find the answer here:


Thank you. I’ll try calling a little helper app from App.Open that way.

You can use a PE editor (e.g. ResEdit, which is free) to modify your built app’s manifest. In the manifest, you can specify the UAC execution level required:

See the remarks on this page to learn about the different execution levels and what they mean. For example, if your app should only be run by administrators but never by normal users, the requireAdministrator is the proper execution level.

Thank you, Andrew. I’ll also look at this solution.