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 / C++ / MFC
  4. Registry read operation fails on Vista

Registry read operation fails on Vista

Scheduled Pinned Locked Moved C / C++ / MFC
windows-adminsecurityhelpquestion
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.
  • S Offline
    S Offline
    Sameer_Thakur
    wrote on last edited by
    #1

    Hi all. In my application I am trying to read some registry values which are stored during installation. Registry reading/writing operation works fine on all other OS but it fails on Vista. When I disable the UAC from Vista, it supports registry reading and writing. Here is the way I am disabling UAC Start->Control panel->User Accounts->Change Security Settings->Uncheck "Use User Account Control (UAC) to help protect your Computer”. But disabling UAC is certainly not a good way to get the solution. Is there any other way by which I can read/write registry without disabling UAC? Thanks

    Sameer Thakur

    _ P B 3 Replies Last reply
    0
    • S Sameer_Thakur

      Hi all. In my application I am trying to read some registry values which are stored during installation. Registry reading/writing operation works fine on all other OS but it fails on Vista. When I disable the UAC from Vista, it supports registry reading and writing. Here is the way I am disabling UAC Start->Control panel->User Accounts->Change Security Settings->Uncheck "Use User Account Control (UAC) to help protect your Computer”. But disabling UAC is certainly not a good way to get the solution. Is there any other way by which I can read/write registry without disabling UAC? Thanks

      Sameer Thakur

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      You can write to HKEY_CURRENT_USER in the registry. Alternatively you can create a manifest file and then allow your application to run under Admin privileges and this would allow you to write to the registry. There are also some more ways in which you can do this that you can look for yourself.

      Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

      1 Reply Last reply
      0
      • S Sameer_Thakur

        Hi all. In my application I am trying to read some registry values which are stored during installation. Registry reading/writing operation works fine on all other OS but it fails on Vista. When I disable the UAC from Vista, it supports registry reading and writing. Here is the way I am disabling UAC Start->Control panel->User Accounts->Change Security Settings->Uncheck "Use User Account Control (UAC) to help protect your Computer”. But disabling UAC is certainly not a good way to get the solution. Is there any other way by which I can read/write registry without disabling UAC? Thanks

        Sameer Thakur

        P Offline
        P Offline
        Paresh Chitte
        wrote on last edited by
        #3

        I Hope this[^] will help you. Regards, Paresh.

        1 Reply Last reply
        0
        • S Sameer_Thakur

          Hi all. In my application I am trying to read some registry values which are stored during installation. Registry reading/writing operation works fine on all other OS but it fails on Vista. When I disable the UAC from Vista, it supports registry reading and writing. Here is the way I am disabling UAC Start->Control panel->User Accounts->Change Security Settings->Uncheck "Use User Account Control (UAC) to help protect your Computer”. But disabling UAC is certainly not a good way to get the solution. Is there any other way by which I can read/write registry without disabling UAC? Thanks

          Sameer Thakur

          B Offline
          B Offline
          Blake Miller
          wrote on last edited by
          #4

          Check the permissions requested when opening the primary keys for reading. You might be using KEY_ALL_ACCESS when you should only request the privileges you need. Try using only KEY_QUERY_VALUE|KEY_READ instead and oyu will find it probably works as expected.

          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