Delphi Xe2 version How to let the Delphi program start automatically "run as Administrator"

Source: Internet
Author: User

Since Vista after the addition of the UAC security mechanism, the use of Delphi developed programs if you do not right-click "Run as Administrator", will be an error.

The Delphi version above XE2 is very simple to deal with this problem.

Right-click on the project, select "Options", "Applicaion", the runtime themes entry set to "Use Custom manifest", click the button below, select the appropriate manifest file.

It is important to note that the debug and release modes are different for the same setting

As for the manifest file, which is an XML document, the original is as follows:

<?xml version= "1.0" encoding= "UTF-8" standalone= "yes"?>
<assembly xmlns= "urn:schemas-microsoft-com:asm.v1" manifestversion= "1.0" >
<trustinfoxmlns= "Urn:schemas-microsoft-com:asm.v3" >
<security>
<requestedPrivileges>
<requestedexecutionlevellevel= "Requireadministrator"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

Delphi Xe2 version How to let the Delphi program start automatically "run as Administrator"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.