Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Forcing an application to Admin from config file

Is there a way I can add a setting in the configuration file so that that application will always start as admin? Thanks a lot.

like image 451
Andrea Nagar Avatar asked Jan 24 '26 15:01

Andrea Nagar


1 Answers

Not from the config file, but in the .manifest.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
            </requestedPrivileges>
        </security>
    </trustInfo>
</assembly>

http://blogs.msdn.com/b/nikhiln/archive/2007/04/19/embed-a-manifest-to-make-an-application-elevate-in-vista.aspx

like image 109
Mark Sowul Avatar answered Jan 26 '26 04:01

Mark Sowul



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!