You can also use a registration file to import data into the system Registry. REG files are ASCII files that contain information about what values and keys should be added to the Registry and where to add the data. The following code shows the contents of a REG file that establishes the display settings shown in Figure 10-1 on page 257. I created this REG file by selecting the HKEY_CURRENT_CONFIG\Display\Settings key and choosing the Export Registry File item from the Registry menu:
REGEDIT4
[HKEY_CURRENT_CONFIG\Display\Settings]
"fonts.fon" = "vgasys.fon"
"fixedfon.fon" = "vgafix.fon"
"oemfonts.fon" = "vgaoem.fon"
"DPILogicalX" = "96"
"DPILogicalY" = "96"
"DPIPhysicalX" = "96"
"DPIPhysicalY" = "96"
"BitsPerPixel" = "4"
"Resolution" = "640,480"
If you have worked with REG files under Windows 3.1 or Windows NT, you will notice that the syntax here differs slightly. The first entry in the REG file is the word REGEDIT4, which specifies that the syntax of the file should follow the Windows 95 convention. This file will add the values specified (fonts.fon, fixedfon.fon, and so on) under the HKEY_CURRENT_CONFIG\Display\Settings key. More details describing exactly how to create registration files can be found in the Win32 SDK documentation.