我有一个从.xaml文件读取动态创建视图的wpf应用程序。我们使用相对路径来读取文件。有什么建议吗?
发布于 2012-09-25 00:27:41
您将被授予对该Program Files文件夹的访问权限的唯一方式是Creating and Embedding an Application Manifest (UAC)。
举个例子:
Executable: IsUserAdmin.exe
Manifest:IsUserAdmin.exe.manifest
Sample application 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.0.0.0"
processorArchitecture="X86"
name="IsUserAdmin"
type="win32"/>
<description>Description of your application</description>
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>但是你一定要使用go and read the API。
https://stackoverflow.com/questions/12568731
复制相似问题