Help with Windows admin rights



  • Writing my first program!
    I've been bashing my head against the wall for a few days and cannot find consistent information.
    I've been following this post to embed the manifest into the my app. This doesn't seem to work. But here is what I have.

    .pro file
    *QT += core gui
    widgets

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = FirewallConfig
    TEMPLATE = app

    SOURCES += main.cpp
    firewallconfig.cpp

    HEADERS += firewallconfig.h

    FORMS += firewallconfig.ui

    RC_FILE = firewallconfig.rc

    win32 {
    WINSDK_DIR = C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A
    WIN_PWD = $$replace(PWD, /, \)
    OUT_PWD_WIN = $$replace(OUT_PWD, /, \)
    QMAKE_POST_LINK = "$$WINSDK_DIR/bin/x64/mt.exe -manifest $$quote($$WIN_PWD\$$basename(TARGET).manifest) -outputresource:$$quote($$OUT_PWD_WIN\${DESTDIR_TARGET};1)"
    }

    .exe.manifest
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity type="" name="FirewallConfig" version="0.0.0.1" processorArchitecture="X86" type=""/>
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
    <requestedPrivileges>
    <requestedExecutionLevel level="requireAdministrator"/>
    </requestedPrivileges>
    </security>
    </trustInfo>
    </assembly>

    .rc file
    VS_VERSION_INFO VERSIONINFO
    FILEVERSION VER_FILEVERSION
    PRODUCTVERSION VER_PRODUCTVERSION
    BEGIN
    BLOCK "StringFileInfo"
    BEGIN
    BLOCK "040904E4"
    BEGIN
    VALUE "CompanyName", "Siemens"
    VALUE "FileDescription", "Firewall Config"
    VALUE "FileVersion", "0,0,0,1"
    VALUE "InternalName", "Firewallconfig"
    VALUE "LegalCopyright", "Copyright © 2015 Siemens"
    VALUE "OriginalFilename", "firewallconfig.exe"
    VALUE "ProductName", "FirewallConfig"
    VALUE "ProductVersion", "0,0,0,1"
    END
    END

    BLOCK "VarFileInfo"
    BEGIN
    VALUE "Translation", 0x0409, 0x04B0
    END
    END

    Please help! and thank you!



  • Bueller?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.