Delphi app manifest file problems under WinXP and Win7

Posted by Ronaldo Junior on Stack Overflow See other posts from Stack Overflow or by Ronaldo Junior
Published on 2010-04-06T21:05:06Z Indexed on 2010/04/06 23:53 UTC
Read the original article Hit count: 843

My last question "List service and services status under Win-7" made me start working on a solution that gives my app the admin privileges under Windows Vista onward based on a .manifest file.

I was not sure about continue the previous question with this matter since they are not the same so here is another question:

My app now works fine under Win 7 whether or not I run it "as admin" because of the manifest file. My manifest file is as follow:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity version="1.6.0.5" processorArchitecture="X86" name="ServiceMonitorPro" type="win32"/>
  <description publisher="Powershield Ltd" product="Powershield Service Monitor">Powershield Service Monitor</description>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
   <security>
    <requestedPrivileges>
     <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
    </requestedPrivileges>
   </security>
  </trustInfo>
 </assembly>

When the application runs on windows 7 or Vista, the UAC comes with a dialog like this: alt text

How can I replace the "unknow" publisher?

The other and bigest problem is, even thou the app runs with no problem under Win7 or Vista, under WinXP it is now crashing with the message: "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."

Another thing I would like to add: If I add reference (uses clause) to XPMan the app works fine on WinXP but then it my .manifest file makes no diference under Vista or Win7.

© Stack Overflow or respective owner

Related posts about delphi

Related posts about privileges