Skip to content

How to set permissions for windows app to run as admin on every launch #3961

Answered by roshannzth
roshannzth asked this question in Q&A
Discussion options

You must be logged in to vote

I found this on the stackoverflow which does the job

in app.manifest

<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
            </requestedPrivileges>
        </security>
</trustInfo>

in package.manifest

<Capabilities>
    <rescap:Capability Name="runFullTrust" />
    <rescap:Capability Name="allowElevation" />
</Capabilities>

source: https://stackoverflow.com/a/72783681
example: https://github.com/ParkhutRoman/AsAdminWindowsAppSDK

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by roshannzth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant