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. How to be informed/notified of registry modifications

How to be informed/notified of registry modifications

Scheduled Pinned Locked Moved C / C++ / MFC
windows-admintutorialquestion
26 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.
  • A Alexandre GRANVAUD

    Hi, i need to know when some (or every, if no other way) keys of the windows' registry are modified or added or removed. I looked for some kind of hooks but didn't manage to do it... Is there a way to achieve this ? thanks ;)

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

    Alexandre GRANVAUD wrote:

    Hi, i need to know when some (or every, if no other way) keys of the windows' registry are modified or added or removed.

    See RegNotifyChangeKeyValue().


    "A good athlete is the result of a good and worthy opponent." - David Crow

    "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

    A L 3 Replies Last reply
    0
    • D David Crow

      Alexandre GRANVAUD wrote:

      Hi, i need to know when some (or every, if no other way) keys of the windows' registry are modified or added or removed.

      See RegNotifyChangeKeyValue().


      "A good athlete is the result of a good and worthy opponent." - David Crow

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      A Offline
      A Offline
      Alexandre GRANVAUD
      wrote on last edited by
      #3

      yeah thanks a lot ! :)

      1 Reply Last reply
      0
      • D David Crow

        Alexandre GRANVAUD wrote:

        Hi, i need to know when some (or every, if no other way) keys of the windows' registry are modified or added or removed.

        See RegNotifyChangeKeyValue().


        "A good athlete is the result of a good and worthy opponent." - David Crow

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

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

        Is Microsoft still hiding that stuff in the documentation?

        led mike

        1 Reply Last reply
        0
        • A Alexandre GRANVAUD

          Hi, i need to know when some (or every, if no other way) keys of the windows' registry are modified or added or removed. I looked for some kind of hooks but didn't manage to do it... Is there a way to achieve this ? thanks ;)

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #5

          See Registry List Control[^] is helpful for you


          WhiteSky


          A 1 Reply Last reply
          0
          • H Hamid Taebi

            See Registry List Control[^] is helpful for you


            WhiteSky


            A Offline
            A Offline
            Alexandre GRANVAUD
            wrote on last edited by
            #6

            Thanks guys ! ^^

            1 Reply Last reply
            0
            • D David Crow

              Alexandre GRANVAUD wrote:

              Hi, i need to know when some (or every, if no other way) keys of the windows' registry are modified or added or removed.

              See RegNotifyChangeKeyValue().


              "A good athlete is the result of a good and worthy opponent." - David Crow

              "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

              A Offline
              A Offline
              Alexandre GRANVAUD
              wrote on last edited by
              #7

              Ok i tried this function but the only thing it does is notifying me something has changed under a specified regkey. But how do i know what exactly changed ?

              D 1 Reply Last reply
              0
              • A Alexandre GRANVAUD

                Ok i tried this function but the only thing it does is notifying me something has changed under a specified regkey. But how do i know what exactly changed ?

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

                Alexandre GRANVAUD wrote:

                But how do i know what exactly changed ?

                You mean what value was changed?


                "A good athlete is the result of a good and worthy opponent." - David Crow

                "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                A 1 Reply Last reply
                0
                • D David Crow

                  Alexandre GRANVAUD wrote:

                  But how do i know what exactly changed ?

                  You mean what value was changed?


                  "A good athlete is the result of a good and worthy opponent." - David Crow

                  "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                  A Offline
                  A Offline
                  Alexandre GRANVAUD
                  wrote on last edited by
                  #9

                  yes or what subkey was added/removed ... etc

                  D 1 Reply Last reply
                  0
                  • A Alexandre GRANVAUD

                    yes or what subkey was added/removed ... etc

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

                    You'll need to compare before and after "snapshots."


                    "A good athlete is the result of a good and worthy opponent." - David Crow

                    "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                    A 1 Reply Last reply
                    0
                    • D David Crow

                      You'll need to compare before and after "snapshots."


                      "A good athlete is the result of a good and worthy opponent." - David Crow

                      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                      A Offline
                      A Offline
                      Alexandre GRANVAUD
                      wrote on last edited by
                      #11

                      that's what i already do but it's very very slow because ineed to compare 2 trees of HKLM\Classes ! no way to get only the things that changed ?

                      D 1 Reply Last reply
                      0
                      • A Alexandre GRANVAUD

                        that's what i already do but it's very very slow because ineed to compare 2 trees of HKLM\Classes ! no way to get only the things that changed ?

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

                        Alexandre GRANVAUD wrote:

                        no way to get only the things that changed ?

                        None that I know of.


                        "A good athlete is the result of a good and worthy opponent." - David Crow

                        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                        A 1 Reply Last reply
                        0
                        • D David Crow

                          Alexandre GRANVAUD wrote:

                          no way to get only the things that changed ?

                          None that I know of.


                          "A good athlete is the result of a good and worthy opponent." - David Crow

                          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                          A Offline
                          A Offline
                          Alexandre GRANVAUD
                          wrote on last edited by
                          #13

                          :( so is there a way to extract a .reg (snapshot) at one time, extract another one after and a tool to compare and save another .reg containing the differences ?

                          D 1 Reply Last reply
                          0
                          • A Alexandre GRANVAUD

                            :( so is there a way to extract a .reg (snapshot) at one time, extract another one after and a tool to compare and save another .reg containing the differences ?

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

                            Yes, see RegSaveKey().


                            "A good athlete is the result of a good and worthy opponent." - David Crow

                            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                            A 1 Reply Last reply
                            0
                            • D David Crow

                              Yes, see RegSaveKey().


                              "A good athlete is the result of a good and worthy opponent." - David Crow

                              "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                              A Offline
                              A Offline
                              Alexandre GRANVAUD
                              wrote on last edited by
                              #15

                              great :) with this i can do my 2 snapshots (are they .reg files ?) but how to compare and extract differencies from the 2 snapshots ?

                              D 1 Reply Last reply
                              0
                              • A Alexandre GRANVAUD

                                great :) with this i can do my 2 snapshots (are they .reg files ?) but how to compare and extract differencies from the 2 snapshots ?

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

                                Alexandre GRANVAUD wrote:

                                (are they .reg files ?)

                                That's determined by the second argument.

                                Alexandre GRANVAUD wrote:

                                but how to compare and extract differencies from the 2 snapshots ?

                                The same way you would compare any two files. For a quick & dirty approach, you could capture the output of fc.exe.


                                "A good athlete is the result of a good and worthy opponent." - David Crow

                                "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                                A 1 Reply Last reply
                                0
                                • D David Crow

                                  Alexandre GRANVAUD wrote:

                                  (are they .reg files ?)

                                  That's determined by the second argument.

                                  Alexandre GRANVAUD wrote:

                                  but how to compare and extract differencies from the 2 snapshots ?

                                  The same way you would compare any two files. For a quick & dirty approach, you could capture the output of fc.exe.


                                  "A good athlete is the result of a good and worthy opponent." - David Crow

                                  "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                                  A Offline
                                  A Offline
                                  Alexandre GRANVAUD
                                  wrote on last edited by
                                  #17

                                  fc.exe is it included in windows ?

                                  D 1 Reply Last reply
                                  0
                                  • A Alexandre GRANVAUD

                                    fc.exe is it included in windows ?

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

                                    As far as I know, it's part of the standard installation.


                                    "A good athlete is the result of a good and worthy opponent." - David Crow

                                    "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                                    A 1 Reply Last reply
                                    0
                                    • D David Crow

                                      As far as I know, it's part of the standard installation.


                                      "A good athlete is the result of a good and worthy opponent." - David Crow

                                      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                                      A Offline
                                      A Offline
                                      Alexandre GRANVAUD
                                      wrote on last edited by
                                      #19

                                      nice :) but the second argument you mentionned is just the filename not the fileformat, i'd need text file format (like .regs are)

                                      D 1 Reply Last reply
                                      0
                                      • A Alexandre GRANVAUD

                                        nice :) but the second argument you mentionned is just the filename not the fileformat, i'd need text file format (like .regs are)

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

                                        Alexandre GRANVAUD wrote:

                                        i'd need text file format (like .regs are)

                                        Which is what RegSaveKey() does.


                                        "A good athlete is the result of a good and worthy opponent." - David Crow

                                        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                                        A 1 Reply Last reply
                                        0
                                        • D David Crow

                                          Alexandre GRANVAUD wrote:

                                          i'd need text file format (like .regs are)

                                          Which is what RegSaveKey() does.


                                          "A good athlete is the result of a good and worthy opponent." - David Crow

                                          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                                          A Offline
                                          A Offline
                                          Alexandre GRANVAUD
                                          wrote on last edited by
                                          #21

                                          no it saves a .dat file which is (i verified it with notepad) a binary file not a text file : a proprietary fileformat

                                          D 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