Archive: restore registry value


restore registry value
I created installer with NSIS and it installes everything correctly.
But I have a problem with uninstaller.
I created two registry keys and added values to Pass and Classpass which I would like to restore into the previous values when I uninstall the program.
For two registry keys I created, it is pretty easy to delete the keys using "DeleteRegValue" command.
However, for two registry values that I added, Pass and Classpath, I should not delete the keys but I must revert them to the previous values which I have no idea how to do.
I am kind of thinking of using global variables to store the previous values and use them when I restore but do not know how to declare and use global variables.
Or is there any simple way that I can revert the the previous registry values into the previous ones?


Store the previous values in another registry key.