Results 1 to 6 of 6

Thread: Any Qt way of elevating a process's UAC privilege on windows 7?

  1. #1
    Join Date
    Oct 2013
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Any Qt way of elevating a process's UAC privilege on windows 7?

    Our application is based on Qt4.8.4 on windows 7 64-bit. We would like to go for windows app certification.
    One of the requirements for certification is that the application should start with standard user privileges and then application can elevate itself to admin level whenever required.
    Using manifest file and windows API's we can achieve that.

    Is there any Qt way of handling such scenarios on windows 7?

    In windows terms, say, the application starts up with "asInvoker" privilege and then elevate it to "requireAdministrator" privilege whenever required and then go lower again when done.

    Thanks in Advance.

  2. #2
    Join Date
    Oct 2013
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Any Qt way of elevating a process's UAC privilege on windows 7?

    Our application is based on Qt4.8.4 on windows 7 64-bit. We would like to go for windows app certification.
    One of the requirements for certification is that the application should start with standard user privileges and then application can elevate itself to admin level whenever required.
    Using manifest file and windows API's we can achieve that.

    Is there any Qt way of handling such scenarios on windows 7?

    In windows terms, say, the application starts up with "asInvoker" privilege and then elevate it to "requireAdministrator" privilege whenever required and then go lower again when done.

    Thanks in Advance.

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,546 Times in 1,496 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Any Qt way of elevating a process's UAC privilege on windows 7?

    If you already have code that does that using windows API, then just keep using that.

    The windows API is C/C++, right?

    Cheers,
    _

  4. #4
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,531
    Thanked 281 Times in 276 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Any Qt way of elevating a process's UAC privilege on windows 7?

    You cannot change the security token assigned to a process as soon as it is created. So You must do it by manifest.

  5. #5
    Join Date
    Oct 2013
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Any Qt way of elevating a process's UAC privilege on windows 7?

    True, windows API is c++. But just wanted to know and try out if we can resolve certification related lua issues in some safe and platform independent way.
    Also wanted to know if there are any design concepts in Qt related to UAC that we have missed or are unaware of.

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,546 Times in 1,496 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Any Qt way of elevating a process's UAC privilege on windows 7?

    UAC is a Windows specific concept, so there is no need for any cross platform API.
    You could look into the Qt Window Extras addon, but I doubt that it contains something as low level as this.

    Cheers,
    _

Similar Threads

  1. Getting main app process
    By dcypher in forum Qt Programming
    Replies: 2
    Last Post: 2nd April 2013, 21:54
  2. Obtaining Windows Handle for Child Process
    By GTBuilder in forum Qt Programming
    Replies: 5
    Last Post: 19th March 2008, 21:54
  3. Accessing keyboard input in child process
    By GTBuilder in forum Qt Programming
    Replies: 0
    Last Post: 22nd January 2008, 16:04
  4. Detaching after fork from child process
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 15th November 2007, 09:56
  5. Replies: 4
    Last Post: 4th June 2007, 08:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.