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. Reading from registry

Reading from registry

Scheduled Pinned Locked Moved C / C++ / MFC
windows-admintutorial
5 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
    V K 2
    wrote on last edited by
    #1

    I have two specific keys available at the following location in registry HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\INSTALLER\USERDATA\S-1-5-18\PRODUCTS\---CLASSID----\InstallProperties\ The above path is having classid with it. How to read this and retrieve the value.

    L D P 3 Replies Last reply
    0
    • V V K 2

      I have two specific keys available at the following location in registry HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\INSTALLER\USERDATA\S-1-5-18\PRODUCTS\---CLASSID----\InstallProperties\ The above path is having classid with it. How to read this and retrieve the value.

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      Venkat KR wrote:

      How to read this and retrieve the value.

      Maybe you can use CRegKey[^]

      1 Reply Last reply
      0
      • V V K 2

        I have two specific keys available at the following location in registry HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\INSTALLER\USERDATA\S-1-5-18\PRODUCTS\---CLASSID----\InstallProperties\ The above path is having classid with it. How to read this and retrieve the value.

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Venkat KR wrote:

        How to read this and retrieve the value.

        Start here.

        "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        P 1 Reply Last reply
        0
        • D David Crow

          Venkat KR wrote:

          How to read this and retrieve the value.

          Start here.

          "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          P Offline
          P Offline
          Pavan_Putra
          wrote on last edited by
          #4

          //Open the registrey and check that is it writable lRet=RegOpenKey(HKEY_LOCAL_MACHINE, strKeyPath,hKey); //if lRet != ERROR_SUCCESS then go to read registrey unsigned char* lpBufferValue = new unsigned char [dwSize]; unsigned long dwType = 0; unsigned long dwSize = 0; lpBufferValue = new unsigned char [dwSize]; ASSERT(lpBufferValue); lRet = RegQueryValueEx(hKey,strValueName, NULL,dwType, lpBufferValue,dwSize); // if dwSize is not 0 then it is success // close registrey (either success or failure ) RegCloseKey(hKey); I hope this will work.

          It's not enough to be the best, when you have capability to be great..

          1 Reply Last reply
          0
          • V V K 2

            I have two specific keys available at the following location in registry HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\INSTALLER\USERDATA\S-1-5-18\PRODUCTS\---CLASSID----\InstallProperties\ The above path is having classid with it. How to read this and retrieve the value.

            P Offline
            P Offline
            Pavan_Putra
            wrote on last edited by
            #5

            //Open the registrey and check that is it writable lRet=RegOpenKey(HKEY_LOCAL_MACHINE, strKeyPath,hKey); //if lRet != ERROR_SUCCESS then go to read registrey unsigned char* lpBufferValue = new unsigned char [dwSize]; unsigned long dwType = 0; unsigned long dwSize = 0; lpBufferValue = new unsigned char [dwSize]; ASSERT(lpBufferValue); lRet = RegQueryValueEx(hKey,strValueName, NULL,dwType, lpBufferValue,dwSize); // if dwSize is not 0 then it is success // close registrey (either success or failure ) RegCloseKey(hKey); I hope this will work.

            It's not enough to be the best, when you have capability to be great....

            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