PDA

View Full Version : How to export bit from registry?



SteevieNiteHeat
08-15-2008, 11:03 AM
Hi!
I am making a little app that will backup my settings from registry to a file, but I am stuck! At the moment I am using a batch file and calling this from AMS, but being as we are long away from DOS and being as I know AMS can do this itself, I would muchly prefer the AMS way.

I need to export: HKEY_CURRENT_USER\Software\Shemes to a registry file whereby it will write the reg file as so everything above will be written to this file.


Anybody care to shed some light on a way of doing this please?

Ulrich
08-15-2008, 01:31 PM
There is no functionality inside AutoPlay for exporting registry hives. You can read, set and delete keys and values, but I see no way to export anything. But this doesn't mean that you have to run a batch file. You could do perform the operation from inside AMS itself, executing the utility installed with Windows.

As an example, this code exports one hive to your temporary folder.


Shell.Execute("reg", "open", "EXPORT HKEY_CURRENT_USER\\Software\\Microsoft " .. _TempFolder .. "\\registry_export.reg", "", SW_MINIMIZE);

Check the command line options of REG (the Console Registry Tool for Windows) for further inspiration. Hope this helps.

Ulrich