Requested Registry Access is not allowed error in Windows 7 RRS feed

  • 问题

  • I want to get some register information on another XP(x86) PC.

    And my code is as below:


    RegistryKey.OpenRemoteBaseKey("RegistryHive.LocalMachine", hostname).OpenSubKey("SOFTWARE\Microsoft\Office\Excel\Addins", false);


    if I run this code snippet above on XP(x86), it works well.

    But, if I run it on WIN7(64), it will throw out "Requested registry access is not allowed."

    this issue upsets me. How to fix it on WIN7(64)?

    2012年5月29日 10:51