Exporting and Importing Data
One of RegEdit ’s unique features is its ability to store Registry data in a human-readable format, then import data in that same format to repair or recreate existing data, or even create new keys and values. Better still, you can create your own files, so you can automate Registry changes needed for your particular network or computing environment. You can also store multiple sets of Registry data and switch between them as needed. This is often useful for system administrators who need to develop their own management tools.
What’s in a .REG File?
The .REG file format is simple to understand. Fortunately, that makes it simple for programs to parse, too; in Chapter 8, you’ll see some Perl scripts that manipulate .REG files. In the meantime, let’s examine the format that RegEdit uses so you’ll be able to make sense of it when you see it.
Here’s a snippet gleaned from my desktop machine’s Registry:
REGEDIT4 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Browser] "Type"=dword:00000020 "Start"=dword:00000002 "ErrorControl"=dword:00000001 "ImagePath"=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,53,79,73, \ 74,65,6d,33,32,5c,73,65,72,76,69,63,65,73,2e,65,78,65,00 "DisplayName"="Computer Browser" "DependOnService"=hex(7):4c,61,6e,6d,61,6e,57,6f,72,6b,73,74,61,74,69, \ 6f,6e,00,4c,61,6e,6d,61,6e,53,65,72,76,65,72,00,4c,6d,48,6f,73,74, \ 73,00,00 "DependOnGroup"=hex(7):00 "ObjectName"="LocalSystem" [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Browser\Linkage] ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access