Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Require administrator privileges



  • I am making an application that edits the system registry. How can I make the program require administrator privileges? In Windows Vista and 7, I can use a Manifest file with @<requestedExecutionLevel level="requireAdministrator" />@ Will this work in Windows XP?



  • Xp doesn't have a UAC.



  • Will I get an error when I try to edit the registry from a non-admin account?



  • [quote author="stuk" date="1287413908"]Xp doesn't have a UAC.[/quote]
    Nevertheless, I have the same problem with Windows7.

    My situation:
    I have a application that working as a windows service (or linux daemon).
    And the application that represent "Control Panel" for this service/daemon, it can install/uninstall and start/stop this service.

    Under windows I build this project with QtSDK 4.7.0 (mingw).

    In case when UAC is enabled, I have error "unable to install service" because by default my ControlPanel does not have are embedded manifest with desired privileges.

    But if UAC is disabled then all works fine!



  • I know this is an old post but did you ever find a fix for this. I am currently in the same situation and need to elevate the priveleges of my application in order for it to work as required.

    I have managed to find out that I need to include a manifest file within my application in order to achieve this but I cannot find any resources on how to do this on the net.

    Thanks in advance

    Scott


Log in to reply