n0On3
10th March 2003 21:38 UTC
How To Export a Whole Registry Branch?
I am willing to export a registry branch to a .reg file. But I don't know how to do it.
I feel that the most primitive way would be to make a loop with EnumRegKey and EnumRegValue and then FileWrite that info to the regfile. But, is there a better way to do that? (speed is a factor in this situation)
rsegal
10th March 2003 23:03 UTC
EnumRegKey is probably a good way. You could also read all the registry keys either iteratively or recursively. Not sure if that would be faster or not.
kichik
11th March 2003 14:59 UTC
This page should help:
http://www.jsiinc.com/subc/tip1000/rh1087.htm
Joost Verburg
11th March 2003 15:01 UTC
Access to regedit is sometimes not available for restricted users. If that is a problem, you should find another way.
n0On3
12th March 2003 01:25 UTC
Great kichik!
I think that will make my job very easy :)
I knew that "/s" was to insert silently but didn't know that one :eek:
Few more tricks with the registry:
if want to delete a branch write a dash between the H and K, like this:
[H-KEY_CURRENT_USER\Software\blabla]
and if want to delete a value write a dash after the equal, like this:
value=-
if anyone knows more tricks please leave them here:)
kichik
12th March 2003 21:11 UTC
You can always process the .reg file yourself for that, but I can't see how that would be useful if you have NSIS's DelRegValue and DelRegKey.
n0On3
13th March 2003 03:28 UTC
it was just general information