CIS 170F: Windows 7 Administration

Week 10

Application Support
Windows 7 Registry
Registry Editing Tools

The registry is complex and dynamically modified by software that is running in the operating system. The Control Panel and Administrative Tools are the preferred method to alter registry settings. However, some registry settings, are not exposed to either the Controlpanel or the Administrative Tools.

Before making any changes to the registry, ensure that the following precautions are taken:

  • Back up all important data on the computer before making any changes to the registry.
  • Back up the portionj of the registry that you will be changing
  • Confirm that the computer can restart properly before the change is made.
  • Restrict the number of changes made at one time to limit the impact the changes have all at once.
  • Confirm the effect of changes on a test system, where possible, to limit impact to production systems.
  • Restart after the registry change is amde to ensure that the computer can still be started.

The hive files are usually found in the locations shown below:

Key Default Location and Hive File
HKEY_LOCAL_MACHINE\SAM \windows\system32\config\sam
HKEY_LOCAL_MACHINE\Security \windows\system32\config\security
HKEY_LOCAL_MACHINE\Software \windows\system32\config\software
HKEY_LOCAL_MACHINE\System \windows\system32\config\system
HKEY_LOCAL_MACHINE\Components \windows\system32\config\components
HKEY_USERS\.Default \windows\system32\config\default

The two main tools to directly edit the registry database are the graphical editor, REGEDIT.EXE, and the command-line editing tool, REG.EXE.

  • REGEDIT.EXE is a graphical registry editor that allows a user to connect to the active registry database and make changes that are effective immediately.


  • Activity 11-4

    To use REGEDIT, select Start and type REGEDIT in the Search dialog box. Only experienced administrators should use the Registry Editor. It is intended for making configuration changes that can be made directly through the Registry only.

    • Viewing the Registry
    • The Registry Editor doesn't have a Start menu item. The easiest way to run it is to type regedit into the Search field on the Start menu. When regedit appears in the results pane under Programs, take one of the following actions, depending on your needs:

      • If you are logged on as an Administrator, press Enter or click regedit. When the User Account Control dialog box appears, click Continue. The Registry Editor will run with full elevated privileges.
      • If you are not logged on as an Administrator but need to change settings in only the HKEY_CURRENT_USER section of the Registry, press Enter or click regedit. The Registry Editor will run with reduced privileges, and you will not be able to change systemwide settings.
      • If you are not logged on as an Administrator but need to change systemwide settings in HKEY_LOCAL_MACHINE, right-click regedit and select Run as Administrator. Enter an Administrator account's username and password. The Registry Editor will then run with full elevated privileges.

      Technical Name "Friendly" Name Description
      REG_SZ String value Textual information, a simple string of letters.
      REG_BINARY Binary value Binary data, displayed as an arbitrary number of hexadecimal digits.
      REG_DWORD DWORD (32-bit) value A single number displayed in hexadecimal or decimal.
      REG_QWORD QWORD (64-bit) value A single number displayed in hexadecimal or decimal. QWORD values are used primarily by 64-bit Windows applications.
      REG_MULTI_SZ Multistring value A string that can contain more than one line of text.
      REG_EXPAND_SZ Expandable string value Text that can contain environment variables (such as %TEMP%).

    • Searching in the Registry
    • You can search for a Registry entry by key name, value name, or the contents of a value string. First, select a starting point for the search in the left pane. You can select Computer to select the entire Registry, or you can limit your search to one of the top-level keys or any subordinate key. Next, select Edit, Find from the menu and enter a search string in the Find dialog box.

      The Find feature is not case sensitive, so it doesn't matter whether you use upper- or lowercase letters. You can check any of the Look At boxes to designate where in the Registry you expect to find the desired text: in the name of a key, in the name of a value, or in the data, the value itself. Check Match Whole String Only to search only for items whose whole name or value is the desired string. Click Find Next to start the search. The Regedit display indicates the first match to your string; by pressing F3, you can repeat the search to look for other instances.

      Activity 11-5

    • Editing Keys and Values
    • Regedit has no Save or Undo menu items. Changes to the Registry happen immediately and permanently. Additions, deletions, and changes are for real. This is the reason for all the warnings to back up before you poke into the Registry.

      • Adding a Value
      • To add a value to a key, select the key in the left pane and choose Edit, New. Select the type of value to add. The instructions you're following indicate which type of value to add. A new value entry then appears in the right pane. Type the new value's name and press Enter to edit the value:

        • For string values, enter the text of the desired string.
        • For DWORD values, choose Decimal or Hexadecimal, and enter the desired value in the chosen format.
        • For binary values, enter pairs of hexadecimal characters as instructed.

      • Changing a Value
      • If you want to change a value, double-click it in the right pane to bring up the Edit Value dialog box. Alternatively, right-click it and select Modify. Then make the desired change and click OK.

      • Deleting a Value
      • You can delete the entry by viewing its key and locating the value on the right pane. Select the value and choose Edit, Delete from the menu, or right-click and select Delete from the context menu. Confirm by clicking OK.

      • Adding or Deleting a Key
      • Keys must be added as subkeys of existing keys; you can't create a new top-level key. To add a key, select an existing key in the left pane and select Edit, New, Key from the menu. Alternatively, rightclick the existing key and select New, Key from the context menu. A new key appears in the left pane, where you can edit its name. Press Enter after you enter the name.

        You can delete a key by selecting it in the left pane and choosing Edit, Delete from the menu, or by right-clicking it and selecting Delete from the context menu. Click OK to confirm that you intend to delete the key. Deleting a key deletes its values and all its subkeys as well, so without the protection of Undo (or a Registry Recycling Bin), this action is serious.

      • Renaming a Key
      • Choose the key in the left pane and select Edit, Rename, or right-click the key and select Rename. Finally, enter a new name and press Enter.

      • Using Copy Key Name
      • Choosing Edit, Copy Key Name puts the name of the currently selected key into the Clipboard so you can paste it elsewhere if you need to.

  • The command-line tool REG.EXE is typically used to read data from or write data to the registry from inside a scripted batch or command file. The REG.EXE tool requires intimate knowledge of the registry’s hierarchy and values, so it is considered difficult, but powerful, to use.


  • Activity 11-6