Search code examples
windowsprivilegesadministratorelevated-privileges

In which cases an application should require to be executed as administrator?


I'm wondering in which cases an application should require to be executed as administrator. Are there specific actions that should require this privilege level?

As an example... My application (C:\Program Files\MyAppFolder\MyApp.exe) must be able to save, copy, move, modify and delete files that are all inside the application folder (C:\Program Files\MyAppFolder). In order to accomplish these actions without problems, should my application require to be run as administrator?


Solution

  • You will need to have administrative right to modify/create/delete any file in the folders where operating system is installed. eg. windows, Program Files, appdata etc. Following actions requires pemission:

    • To change any system settings
    • To install/uninstall any program
    • To make any registry changes(Registry Editing)

    If you are tring to develop this might help.