public final class RegistryExporter extends Object
A utility class which provides the ability to save registry information to either a *.reg or a *.txt file.
This functionality differs from the RegistryKey.saveKey(File)
method in that *.reg files can be double-clicked in Windows Explorer
to automatically add the keys that were saved to the Windows Registry.
Modifier and Type | Class and Description |
---|---|
static class |
RegistryExporter.Format
Specifies the type of format to use when
saving registry information.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
exportKey(File file,
RegistryExporter.Format format,
RegistryKey... keys)
Exports the specified
RegistryKey objects into the file specified. |
public static boolean exportKey(File file, RegistryExporter.Format format, RegistryKey... keys)
RegistryKey
objects into the file specified.file
- The file to save the keys to.format
- The file format to use when saving.keys
- An array of RegistryKey
s to save.true
if the export was successful,
false
if an IOException
occurred.RegistryException
- if the format isn't supported on the current OS.Copyright © 2011, Yinon Michaeli. All rights reserved.