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. Qt Installer Framework and Administrator privileges [SOLVED]
Forum Updated to NodeBB v4.3 + New Features

Qt Installer Framework and Administrator privileges [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
44 Posts 15 Posters 43.8k 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.
  • tomyT Offline
    tomyT Offline
    tomy
    wrote on last edited by
    #34

    Hello all.
    I think I have also the same issue. If possible please take a look at this thread as well.
    Thank you very much.

    1 Reply Last reply
    0
    • A amahta

      After lots of searching finally I found a solution. Unfortunately this is not documented in version 1.4

      Add the following line to your component's package xml file:
      @<RequiresAdminRights>true</RequiresAdminRights>@

      And use this line in your script file:
      @component.addElevatedOperation("Execute", "someCommand");@
      instead of
      @component.addOperation("Execute", "someCommand");@

      U Offline
      U Offline
      user2301
      wrote on last edited by
      #35

      @amahta said in Qt Installer Framework and Administrator privileges [SOLVED]:

      <RequiresAdminRights>true</RequiresAdminRights>

      How to provide admin access rights or run installer.performOperation in elevated rights?
      For component.addElevatedOperation("Execute", "someCommand") it works.

      But for controller script thid doesn't work

      RatzzR 1 Reply Last reply
      0
      • U user2301

        @amahta said in Qt Installer Framework and Administrator privileges [SOLVED]:

        <RequiresAdminRights>true</RequiresAdminRights>

        How to provide admin access rights or run installer.performOperation in elevated rights?
        For component.addElevatedOperation("Execute", "someCommand") it works.

        But for controller script thid doesn't work

        RatzzR Offline
        RatzzR Offline
        Ratzz
        wrote on last edited by
        #36

        @user2301 said in Qt Installer Framework and Administrator privileges [SOLVED]:

        But for controller script thid doesn't work

        Can you show me what have you tried?

        --Alles ist gut.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          Darshan_NewBee
          wrote on last edited by
          #37

          Hi everyone, i dont know if this question is already discussed but i did not find relatable.
          So my question is i am developing a QT application to initialize the SSD (Solid state drives). So the flow of the application is like that........ when i run the application it checks how many drives are connected..... If i run it as administrator it find the connected drive but when i do not run it as administrator then it cant fetch the connected drive so i want to change in my application that it will not ask me for the administrative username and password.
          Is there any way to do it

          jsulmJ 1 Reply Last reply
          0
          • D Darshan_NewBee

            Hi everyone, i dont know if this question is already discussed but i did not find relatable.
            So my question is i am developing a QT application to initialize the SSD (Solid state drives). So the flow of the application is like that........ when i run the application it checks how many drives are connected..... If i run it as administrator it find the connected drive but when i do not run it as administrator then it cant fetch the connected drive so i want to change in my application that it will not ask me for the administrative username and password.
            Is there any way to do it

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #38

            @Darshan_NewBee said in Qt Installer Framework and Administrator privileges [SOLVED]:

            it checks how many drives are connected

            How? Please provide more details...

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            D 1 Reply Last reply
            0
            • jsulmJ jsulm

              @Darshan_NewBee said in Qt Installer Framework and Administrator privileges [SOLVED]:

              it checks how many drives are connected

              How? Please provide more details...

              D Offline
              D Offline
              Darshan_NewBee
              wrote on last edited by Darshan_NewBee
              #39

              @jsulm So there is DLL that have API's to get that information like number of drives, drive details etc. So this is very known that if you want to fetch the drive details from any platform or any user section it will ask you for administrator credentials to look into it . So i want that it will not ask me for that credentials or it ask me in the time of installation only and later on it simply run with admin privileges,
              Is it possible?

              jsulmJ 1 Reply Last reply
              0
              • D Darshan_NewBee

                @jsulm So there is DLL that have API's to get that information like number of drives, drive details etc. So this is very known that if you want to fetch the drive details from any platform or any user section it will ask you for administrator credentials to look into it . So i want that it will not ask me for that credentials or it ask me in the time of installation only and later on it simply run with admin privileges,
                Is it possible?

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #40

                @Darshan_NewBee said in Qt Installer Framework and Administrator privileges [SOLVED]:

                So there is DLL that have API's

                What library is it?

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  Darshan_NewBee
                  wrote on last edited by
                  #41

                  @jsulm That is opal library. Actually i am in hurry to get the solution can you please tell me what should i do for that.

                  jsulmJ 1 Reply Last reply
                  0
                  • D Darshan_NewBee

                    @jsulm That is opal library. Actually i am in hurry to get the solution can you please tell me what should i do for that.

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #42

                    @Darshan_NewBee said in Qt Installer Framework and Administrator privileges [SOLVED]:

                    can you please tell me what should i do for that

                    No, I don't know what this opal library is (you could post a link at least). Did you try to find something in the documentation of that library? Get some support from the authors? You are asking in a Qt forum about something which is not part of Qt.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    D 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @Darshan_NewBee said in Qt Installer Framework and Administrator privileges [SOLVED]:

                      can you please tell me what should i do for that

                      No, I don't know what this opal library is (you could post a link at least). Did you try to find something in the documentation of that library? Get some support from the authors? You are asking in a Qt forum about something which is not part of Qt.

                      D Offline
                      D Offline
                      Darshan_NewBee
                      wrote on last edited by
                      #43

                      @jsulm Sorry for that but i cant share you the link or more about it because its confidential and our clients dosent want to disclose it . I think there is nothing to tell about the DLL and relevant for my question .So is there any way to bypass the UAC prompt that ask for administrator credentials

                      jsulmJ 1 Reply Last reply
                      0
                      • D Darshan_NewBee

                        @jsulm Sorry for that but i cant share you the link or more about it because its confidential and our clients dosent want to disclose it . I think there is nothing to tell about the DLL and relevant for my question .So is there any way to bypass the UAC prompt that ask for administrator credentials

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #44

                        @Darshan_NewBee said in Qt Installer Framework and Administrator privileges [SOLVED]:

                        So is there any way to bypass the UAC prompt that ask for administrator credentials

                        If that library requires administrator rights to do it work then not.
                        And as I already suggested: ask the authors of that lib, this is Qt forum.

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        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