在应用程序清单文件中设置 UIAccess
若要获取对受保护系统 UI 的访问权限,必须使用清单文件中包含特殊属性的清单文件生成应用程序。 此 uiAccess 属性包含在 requestedExecutionLevel 标记中,如以下代码示例所示。
XML
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="highestAvailable"
uiAccess="true" />
</requestedPrivileges>
</security>
</trustInfo>
此代码中 级别 特性的值只是一个示例。
默认情况下,UIAccess 为“false”。 如果省略该属性,或者没有清单,则应用程序无法访问受保护的 UI。