zoukankan      html  css  js  c++  java
  • Requested registry access is not allowed

    Requested registry access is not allowed

    回答1

    app.manifest should be like this:

    <?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>

    回答2

    You can't write to the HKCR (or HKLM) hives in Vista and newer versions of Windows unless you have administrative privileges. Therefore, you'll either need to be logged in as an Administrator before you run your utility, give it a manifest that says it requires Administrator level (which will prompt the user for Admin login info), or quit changing things in places that non-Administrators shouldn't be playing. :-)

  • 相关阅读:
    【20170923】2017暑假北京学习 day 3
    Leetcode 39
    事无巨细 | 访问一个网站的过程
    Leetcode 77
    排序 | 快速排序
    排序 | 堆排序
    Leetcode 60
    Leetcode 51
    海量数据处理的解法
    Leetcode 99
  • 原文地址:https://www.cnblogs.com/chucklu/p/13219917.html
Copyright © 2011-2022 走看看