我的一个可执行文件将一些配置写入到C:\ Program Files \ MyApp \ config.xml的XML文件中。它需要在Vista/Server 2008上以管理员身份运行,否则操作系统不会让它写入该位置。UAC:清单文件被忽略
我包含一个名为config.exe.manifest的清单文件,在启动时自动请求管理权限。
这里是我的清单文件:
<?xml version="1.0" encoding="utf-8"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
我想这在Windows Server 2008上,但清单文件似乎被忽略和可执行文件没有足够的权限启动。
antony是对的:检查你没有任何内置的可执行文件 - 然后Windows的loader会使用外部的。 – 2009-11-10 19:57:28