News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Requiring Administrator Privileges

Started by Matthias Merkel, June 16, 2018, 10:42:09 PM

Previous topic - Next topic

Matthias Merkel

Is there a way to require administrator privileges when running the application?

hutch--

Its usually the case that you log in as the administrator, if you are not the computer's administrator you should not be trying to circumvent the security.

aw27

Quote from: Matthias Merkel on June 16, 2018, 10:42:09 PM
Is there a way to require administrator privileges when running the application?
You can use a manifest, like this:
<?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>

There is another way, but this should be enough for now.