Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Not Working RegistryKey.openSubKey in windows 7

Not Working RegistryKey.openSubKey in windows 7

Scheduled Pinned Locked Moved C#
help
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vishnukamath
    wrote on last edited by
    #1

    Hi, RegistryKey.openSubKey("KeyName",true) working in windows XP , but it is not working in Windows 7 32 bit. we are getting error : no rights to read.Please suggest me better way

    W L 2 Replies Last reply
    0
    • V vishnukamath

      Hi, RegistryKey.openSubKey("KeyName",true) working in windows XP , but it is not working in Windows 7 32 bit. we are getting error : no rights to read.Please suggest me better way

      W Offline
      W Offline
      Wayne Gaylard
      wrote on last edited by
      #2

      I have just tested it with Win 7 from the MSDN example, and it is working fine. The MSDN site recommends using

      Registry.CurrentUser.OpenSubKey("yourKeyName", true);

      maybe that is an issue.

      ...and I have extensive experience writing computer code, including OIC, BTW, BRB, IMHO, LMAO, ROFL, TTYL.....

      1 Reply Last reply
      0
      • V vishnukamath

        Hi, RegistryKey.openSubKey("KeyName",true) working in windows XP , but it is not working in Windows 7 32 bit. we are getting error : no rights to read.Please suggest me better way

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        Windows, since Vista, protects those entries that affect all users, so you can't just access some of the hives (e.g. LOCAL_MACHINE) any more, unless you get the required privileges and go through UAC. I don't have all the details, I suggest you Google. The CURRENT_USER hive works just fine. And the way the protection works is different on 64-bit systems, I haven't figured that one out at all. :)

        Luc Pattyn [My Articles] Nil Volentibus Arduum

        The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
        Please use <PRE> tags for code snippets, they improve readability.
        CP Vanity has been updated to V2.3

        G 1 Reply Last reply
        0
        • L Luc Pattyn

          Windows, since Vista, protects those entries that affect all users, so you can't just access some of the hives (e.g. LOCAL_MACHINE) any more, unless you get the required privileges and go through UAC. I don't have all the details, I suggest you Google. The CURRENT_USER hive works just fine. And the way the protection works is different on 64-bit systems, I haven't figured that one out at all. :)

          Luc Pattyn [My Articles] Nil Volentibus Arduum

          The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
          Please use <PRE> tags for code snippets, they improve readability.
          CP Vanity has been updated to V2.3

          G Offline
          G Offline
          GenJerDan
          wrote on last edited by
          #4

          Luc Pattyn wrote:

          The CURRENT_USER hive works just fine.

          Unless you're running an app over the network on a terminal and/or VPN. At least, it wouldn't the current user access the HKCU hive when remoting in on the systems here.

          Never give aversion therapy to a masochist. The results are unpredictable. My Mu[sic] My Films My Windows Programs, etc.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups