Configuring Windows Explorer
Registry Overview - Examples of .reg Files


Using Regedit.exe, it is possible to import and export (merge and save) all or part of the registry. This page shows examples of exporting the HKEY_CLASSES_ROOT\txtfile branch using both Windows 95 and Windows NT 4.0.

In both cases,

Notice that there are differences in the directory names and in the doubling of backslashes.


Windows 95 Example

REGEDIT4

[HKEY_CLASSES_ROOT\txtfile]
@="Text Document"
"EditFlags"=hex:00,00,01,00

[HKEY_CLASSES_ROOT\txtfile\DefaultIcon]
@="C:\\WINDOWS\\SYSTEM\\shell32.dll,-152"

[HKEY_CLASSES_ROOT\txtfile\shell]

[HKEY_CLASSES_ROOT\txtfile\shell\open]

[HKEY_CLASSES_ROOT\txtfile\shell\open\command]
@="c:\\windows\\notepad.exe %1"

[HKEY_CLASSES_ROOT\txtfile\shell\print]

[HKEY_CLASSES_ROOT\txtfile\shell\print\command]
@="C:\\WINDOWS\\NOTEPAD.EXE /p %1"


Windows NT 4.0 Example

REGEDIT4

[HKEY_CLASSES_ROOT\txtfile]
@="Text Document"
"EditFlags"=hex:00,00,01,00

[HKEY_CLASSES_ROOT\txtfile\DefaultIcon]
@=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,73,79,73,74,65,6d,33,32,5c,73,\
  68,65,6c,6c,33,32,2e,64,6c,6c,2c,2d,31,35,32,00

[HKEY_CLASSES_ROOT\txtfile\shell]

[HKEY_CLASSES_ROOT\txtfile\shell\open]

[HKEY_CLASSES_ROOT\txtfile\shell\open\command]
@=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,73,79,73,74,65,6d,33,32,5c,4e,\
  4f,54,45,50,41,44,2e,45,58,45,20,25,31,00

[HKEY_CLASSES_ROOT\txtfile\shell\print]

[HKEY_CLASSES_ROOT\txtfile\shell\print\command]
@=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,73,79,73,74,65,6d,33,32,5c,4e,\
  4f,54,45,50,41,44,2e,45,58,45,20,2f,70,20,25,31,00



NT 4.0 Data, Formatted by Hand

HKEY_CLASSES_ROOT\txtfile                     Default="Text Document"
                                             "EditFlags"=hex:00,00,01,00

HKEY_CLASSES_ROOT\txtfile\DefaultIcon         Default="%SystemRoot%\system32\shell32.dll,-152"

HKEY_CLASSES_ROOT\txtfile\shell
HKEY_CLASSES_ROOT\txtfile\shell\open
HKEY_CLASSES_ROOT\txtfile\shell\open\command  Default="%SystemRoot%\system32\NOTEPAD.EXE %1"
HKEY_CLASSES_ROOT\txtfile\shell\print
HKEY_CLASSES_ROOT\txtfile\shell\print\command Default="%SystemRoot%\system32\NOTEPAD.EXE /p %1"


NT 4.0 Data, With the Hive Abbreviated

HKCR --> HKEY_CLASSES_ROOT

HKCR\txtfile                     Default="Text Document"
                                "EditFlags"=hex:00,00,01,00

HKCR\txtfile\DefaultIcon         Default="%SystemRoot%\system32\shell32.dll,-152"

HKCR\txtfile\shell
HKCR\txtfile\shell\open
HKCR\txtfile\shell\open\command  Default="%SystemRoot%\system32\NOTEPAD.EXE %1"
HKCR\txtfile\shell\print
HKCR\txtfile\shell\print\command Default="%SystemRoot%\system32\NOTEPAD.EXE /p %1"


It is unfortunate, but on my test system, the default font sizes for the <pre> text are different in IE 3.02 (too large to fit) and Netscape 3.0 (just right). Because the default font size in both of these products is user configurable, your experience may be different. Using Netscape 3.0 on my 800x600 display, none of the text on this page requires horizontal scrolling; using IE 3.02, it does.