[英]Delphi 7: Execute application with administrator privileges
How do I add the manifest for UAC without adding XP Themes? 如何在不添加XP主题的情况下为UAC添加清单?
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 remains. 但XP主题仍然存在。
I have tried many other manifest, but I get this error: 我尝试了很多其他清单,但是我收到了这个错误:
"Invalid win32 application" “无效的win32应用程序”
Thanks for the help 谢谢您的帮助
If you don't want XP themes, then remove the dependency on version 6 of the common controls. 如果您不想要XP主题,则删除对常用控件的版本6的依赖性。 Remove the
dependency
element, so you have just the trustInfo
remaining. 删除
dependency
元素,因此您只剩下trustInfo
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.