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. :-)

  • 相关阅读:
    uva 11728 Alternate Task
    uvalive 5009 Error Curves
    uva 10341 Solve It
    uva 10870 Recurrences
    uva 11021 Tribbles
    17年9月6日
    React实践相关
    React:Refs and DOM
    React:propTypes
    React:JSX 深入
  • 原文地址:https://www.cnblogs.com/chucklu/p/13219917.html
Copyright © 2011-2022 走看看