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"