1,105,556 Community Members

Adding a Manifest file to Application

Member Avatar
DesignGhosts
Newbie Poster
9 posts since Aug 2011
Reputation Points: 13 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
pritaeas
mod_pritaeas
11,314 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,835 [?]
Skill Endorsements: 155 [?]
Moderator
Featured
Sponsor
 
0
 

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

Member Avatar
DesignGhosts
Newbie Poster
9 posts since Aug 2011
Reputation Points: 13 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
DesignGhosts
Newbie Poster
9 posts since Aug 2011
Reputation Points: 13 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
1
 

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>
Member Avatar
DesignGhosts
Newbie Poster
9 posts since Aug 2011
Reputation Points: 13 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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.

Question Answered as of 2 Years Ago by pritaeas
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article