I've looked for something like this with no luck. I bet it's a contender for a quickie snack:
1) on the first run, the program dumps the registry
2) you do something that affects the registry. (eg install some program)
2) on the second run, the program dumps the registry again
At this point, it diffs the previous registry with the current registry, and outputs all the changes in the form of two .reg files:
one reg file, when run, will undo all the changes and make the registry look like it did on step 1 - it'll delete new entries, and it'll reinstate anything that the user code had deleted.
the other reg file, when run, will re-apply the changes that were made between 1 and 2, whether that was adding a new key, deleting an old one, or just changing the value of one.
This will be really useful for making a 'reinstaller', ie you install a program, register it etc, then want to move it off your disk to save space and then put it back some time later. Or you may want to move it to another computer. Sometimes you just don't want to go through the laborious installation process again, especially when you have to register online and you've already filled out all the forms once before...