Page 1 of 1

registry key export

Posted: Thu Feb 28, 2008 4:26 pm
by harkon
I am trying to find a way to backup my email sort rules in OE to a file so that I can restore them to a different computer. So far I have found the identity value and have then gone to the mail rules section in the registry and recusively found all of the subkeys. I am at the point of recursively extracting the values of all of the subkeys but am having a bit of an issue in identifying the key type. It occured to me that I may be re-inventing something someone has already done via a single function. I've really ended up with a bit of a mess and really need to start over as I was kinda learning as things evolved. I had hoped to eventually make an entire OE backup / restore tool out of this.

Does anyone know of an easy way to just export an entire key to either memory or a file other than calling regedit? An export lib function or something? I'd like to have this as a stand alone app, but it may just be easier to call regedit /e and call it done, nasty as that might be.

Posted: Fri Feb 29, 2008 10:29 pm
by Controller
Use RegEnumKey (A/W) and RegEnumValue (A/W);
For OE/Identities, it may be usefull to use a fixed identity (delete existing and create a fixed key), at least this worked on Win98; This way you can simply import your regestry file.
I once had complete Outlook settings/accounts restored after fresh installation with a single regestry file, but due security issues I moved to another eMail client long ago, and I strongly advise you do the same.
For stand-alone application, you may try reg2exe ( http://www.ctuser.net ) and modify it (Visual Basic 6 / PureBasic combination, however unicode support is still in development)

Posted: Sat Mar 01, 2008 12:21 am
by harkon
Nice, thanks for that. I'm not really a fan of the approach used, but I might be able to glean some information. I'm not sure why the developer didn't use PB for the whole thing. I'm still trying to unravel this but the project as the developer has done it is hard to unravel.

Posted: Sat Mar 01, 2008 6:05 pm
by eJan
I have ts-soft created RegToPB, try this one (modified) which uses modified Droppy's Registry lib
RegToPB.zip
Image
RegToPB GUI supports drag'n'drop, then it generate file with same name as .reg source with .pb extension in source directory -> can be compiled in single exe. I've using it for XP tweaks and settings (1650 .reg lines).
Latest Droppy's lib: http://www.purebasic.fr/english/viewtop ... 697#222697

Posted: Mon Mar 03, 2008 3:58 pm
by harkon
Thanks,

That helps a lot.