Board index » delphi » Windows Registry

Windows Registry

When my application starts, I want to save a registry key (and its
values) in a disk file. When the application closes, I want to restore
the registry key from the saved file.

Examples of how to do this would be much apprecisted.

 

Re:Windows Registry


Quote
Shel wrote in message ...
>When my application starts, I want to save a registry key (and its
>values) in a disk file. When the application closes, I want to restore
>the registry key from the saved file.

>Examples of how to do this would be much apprecisted.

Restoring is the simplest part. Pass a filename to regedit.exe,
and it will merge its contents into the Registry. For the format
of this file, try exporting something from the Registry by hand.
Note that modern Windows versions support - and generate -Unicode
encoding of these files.

Generating these files by code you'll have to build yourself.
Type "TRegistry", press F1, read help. Useful methods include
GetKeyNames, GetValueNames, and GetDataType. Think recursion.

Groetjes,
Maarten Wiltink

Re:Windows Registry


Quote
Shel wrote in message ...
>When my application starts, I want to save a registry key (and its
>values) in a disk file. When the application closes, I want to restore
>the registry key from the saved file.

>Examples of how to do this would be much apprecisted.

Perhaps you can use the TRegistry object and it's
metods SaveKey and RestoreKey?
They are supposed to do exactly what you
describe above.

Regards
/Larry
--
FORMAL NOTICE: unsolicited commercial email will be read
at a charge of $500 per item. Receipt of such email shall
be considered to constitute acceptance of contract, and
will be billed immediately.

Other Threads