Hi there,

I am trying to apply a Manifest file to my delphi application so that it can run with administrative permissions, I have been following this Tutorial part Faking UAC Rights - How to Request Execution Level.

I have got to step 6 where I start getting problems, I have added the .REC file and .Manifest file to the project and also added

{$R TriumphTestABS.REC}

to the project file as required in tutorial. After compiling I run the application and then recieve the following error:

"Unable to create Process: The Application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command line sxstrace.exe tool for more detail".

Can anyone explain what Is going on and how I can resolve it?

Manifest document

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0>
  <assemblyIdentity version="1.1.1.1"
   processorArchitecture="X86"
   name="TriumphTestABS.exe"
   type="win32"/>
  <description>elevate execution level</description>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
  <security>
   <requestedPrivileges>
    <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
   </requestedPrivileges>
  </security>
  </trustInfo>
 </assembly>

Oh and im using Delphi Embarcadero RAD Studio XE IDE.

Let me know if you need any other information.

Thanks

Recommended Answers

All 4 Replies

If that is your file, then close the assembly and trustInfo tag correctly. Other than that, no idea.

Yeah my bad, I have done that but unfortunately still the same problem.

Oh wow, made another rookie, not all quotations matched up.....but now getting a slightly different error:

"Unable to create process: The requested operation requires elevation"

Newly edited Manifest file

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity version="1.1.1.1"
    processorArchitecture="X86"
    name="TriumphTestABS.exe"
    type="win32"/>
    <description>elevate execution level</description>
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
            </requestedPrivileges>
        </security>
    </trustInfo>
 </assembly>
commented: This got me on the right track for Windows logo certification. logo +13

Solved: Managed to suss it out, so main rule is to make sure the xml (.manifest file) is well formatted. Once that is done follow the tutorial, then add both .manifest and .rec file to project and compile and build. If you try to run it you will have the error message: "Unable to create process: The requested operation requires elevation". Not sure why this happens however if you run the .exe it works fine.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.