We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,985 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Adding a Manifest file to Application

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

2
Contributors
4
Replies
1 Hour
Discussion Span
1 Year Ago
Last Updated
5
Views
Question
Answered
DesignGhosts
Newbie Poster
9 posts since Aug 2011
Reputation Points: 23
Solved Threads: 0
Skill Endorsements: 0

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

pritaeas
Posting Prodigy
Moderator
9,286 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,457
Skill Endorsements: 86

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

DesignGhosts
Newbie Poster
9 posts since Aug 2011
Reputation Points: 23
Solved Threads: 0
Skill Endorsements: 0

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>
DesignGhosts
Newbie Poster
9 posts since Aug 2011
Reputation Points: 23
Solved Threads: 0
Skill Endorsements: 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.

DesignGhosts
Newbie Poster
9 posts since Aug 2011
Reputation Points: 23
Solved Threads: 0
Skill Endorsements: 0
Question Answered as of 1 Year Ago by pritaeas

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0697 seconds using 2.67MB