Delphi 7: running an application with administrator privileges

How to add manifest for UAC without adding XP themes?

I tried this manifest:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/> </dependentAssembly> </dependency> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/> </requestedPrivileges> </security> </trustInfo> </assembly> 

but XP themes remain.

I tried a lot of different manifest, but I get this error:

"Invalid win32 application"

thanks for the help

+4
source share
1 answer

If you do not want XP themes, remove the dependency on version 6 of the common controls. Remove the dependency element so that only trustInfo .

+8
source

Source: https://habr.com/ru/post/1441010/


All Articles