不允许请求的注册表访问 [英] Requested registry access is not allowed
本文介绍了不允许请求的注册表访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写一个调整实用程序,用于修改 HKEY_CLASSES_ROOT
下的一些键.
I'm writing a tweak utility that modifies some keys under HKEY_CLASSES_ROOT
.
在 Windows XP 等下一切正常.但我收到错误 Requested registry access is not allowed
在 Windows 7 下.Vista 和 2008 我猜也是.
All works fine under Windows XP and so on. But I'm getting error Requested registry access is not allowed
under Windows 7. Vista and 2008 I guess too.
我应该如何修改我的代码以添加 UAC 支持?
How should I modify my code to add UAC support?
推荐答案
app.manifest
应该是这样的:
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</asmv1:assembly>
这篇关于不允许请求的注册表访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文