registry key export

Just starting out? Need help? Post your questions and find answers here.
harkon
Enthusiast
Enthusiast
Posts: 217
Joined: Wed Nov 23, 2005 5:48 pm

registry key export

Post 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.
Missed it by that much!!
HK
User avatar
Controller
User
User
Posts: 28
Joined: Thu Jul 22, 2004 5:26 am
Location: Germany
Contact:

Post 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)
harkon
Enthusiast
Enthusiast
Posts: 217
Joined: Wed Nov 23, 2005 5:48 pm

Post 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.
Missed it by that much!!
HK
eJan
Enthusiast
Enthusiast
Posts: 366
Joined: Sun May 21, 2006 11:22 pm
Location: Sankt Veit am Flaum

Post 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
harkon
Enthusiast
Enthusiast
Posts: 217
Joined: Wed Nov 23, 2005 5:48 pm

Post by harkon »

Thanks,

That helps a lot.
Missed it by that much!!
HK
Post Reply