Results 1 to 4 of 4

Thread: How to add "UAC execution level" for VC++ project using qmake ?

  1. #1
    Join Date
    Oct 2012
    Posts
    6
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Windows

    Default How to add "UAC execution level" for VC++ project using qmake ?

    I am new to Qt.
    In windows environment, I am generating a .vcproj file using “qmake” (qmake -tp vc abc.proj). Once the project file is created, using Visual Studio, I need to change the configuration for “UAC Execution Level” in the Linker option of “Manifest File”. I tried various options but none worked.
    [1]win32 {
    CONFIG += embed_manifest_exe
    QMAKE_LFLAGS_WINDOWS += /MANIFESTUAC:level=\'requireAdministrator\'
    }

    [2]QMAKE_LFLAGS_WINDOWS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\"
    [3]QMAKE_LFLAGS_WINDOWS += "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\""
    [4]QMAKE_LFLAGS_WINDOWS += /MANIFESTUAC:level=\'requireAdministrator\' uiAccess=\'false\'


    I am using Qt 4.8.3

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to add "UAC execution level" for VC++ project using qmake ?


  3. #3
    Join Date
    Oct 2012
    Posts
    6
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: How to add "UAC execution level" for VC++ project using qmake ?

    Thanks Chris,
    For some strange reason, it did not work for me.
    I am using Qt library 4.8.3. Does it make any difference ? I am using Visual Studio 2008.
    Let me tell you what I did.
    I added the following lines in my ".pro" file (at the end of the file) and build it with "qmake -tp cp abc.pro"
    ******
    win32-msvc* {
    CONFIG += embed_manifest_exe
    QMAKE_LFLAGS_WINDOWS += $$quote( /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\" )
    }

    ******
    When it did not work, I tried using the manifest file. I created one manifest file, added it in ".rc" file (as mentioned as another solution in the same post)and added the RC file entry in ".proj" file. The content of the manifest files was as follows -
    ****
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="abc" type="win32" />
    <description>Test Application</description>
    <dependency />
    <!-- Identify the application security requirements. -->
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
    <requestedPrivileges>
    <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
    </requestedPrivileges>
    </security>
    </trustInfo>
    </assembly>
    ******

    Am I missing something ? Is the Qt version 4.8.3 having some problem ?

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to add "UAC execution level" for VC++ project using qmake ?

    What is the actual link command that is being executed after you rerun qmake and run nmake?

Similar Threads

  1. Replies: 1
    Last Post: 12th October 2010, 14:45
  2. Replies: 3
    Last Post: 15th February 2010, 17:27
  3. Does "emit" in the calling thread mean execution?
    By nomadoro in forum Qt Programming
    Replies: 3
    Last Post: 23rd September 2009, 11:16
  4. Replies: 3
    Last Post: 8th July 2008, 19:37
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

Tags for this Thread

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.