Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Require administrator privileges
Qt 6.11 is out! See what's new in the release blog

Require administrator privileges

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 7.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    szh1
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stukdev
      wrote on last edited by
      #2

      Xp doesn't have a UAC.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        szh1
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • C Offline
          C Offline
          CodeDaemon
          wrote on last edited by
          #4

          [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!

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tekoscott
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved