The Registry explorer contains registry sets. A registry set is a collection of registry sets. A registry set is a collection of registry entries that are created on the target system when one or more of one or more of the components s that the registry data set set belongs to is installed or advertised.

To learn if you need to update the registry, see Updating the Registry.

## Creating a Registry Set

In the Destination view, right-click the Destination Computer node and select New Registry Set. Note that registry set names cannot contain any of the following characters:

\ / : * ? " < > |

## Creating a Registry Set

In the Destination view, right-click the Destination Computer node and select New Registry Set. Note that registry set names cannot contain any of the following characters:

\ / : * ? " < > |

## Using View Filters

Choose a filter from the view filter box to limit what you see in the Registry view. Once you set the view filter, you can go in and modify or delete data in the Destination computer's Registry view.

When you add a registry key, InstallShield will select the best feature or component to associate registry data with by default if one does not already exist.

To turn off best feature or component automatic association:

1. Go to the Tools menu, and select Options.
2. Click the User Interface tab.
3. Deselect 'Automatically determine best feature or component'.
4. Click OK to apply the changes.

## Dragging and Dropping Registry Keys

The easiest way to add registry data to your setup is to drag keys from the Source view and drop them on a key in the Destination view. All registry entries and subkeys of this key are added to the selected feature's registry set's set's data. This method works only if the registry entries exist on your development system.

See Dragging and Dropping Registry Entries for information about the different options available when you right-click a registry entry.

## Selecting a Component

Select the component with which you want to associate registry data from the View Filter box at the top of the Registry Explorer. To view all of the registry data in your entire project, select All Application Data from the combo box. This option displays all registry keys that have values and their associated components in the lower-right corner of the view.

## Associating a Registry Set with a Component

Select the registry set in the Destination view, then check the desired components in the Registry Set Install Conditions view in the lower right. The <Default> registry set's entries are always created on the target system.

## Associating a Registry Set with a Component

Select the registry set in the Destination view, then check the desired components in the Registry Set Install Conditions view in the lower right. The <Default> registry set's entries are always created on the target system.

## Creating a Subkey

To add a registry key, right-click a key in the explorer and select New Key. You can then rename the key. If you do not want to hard-code the name for this key you can use Windows Installer properties that are evaluated when the setup is installed. For example, if you want your key to contain your company name as you entered it in the Publisher field of the Add/Remove Programs properties, you could enter [Manufacturer] for the name of your key. Any property defined in the Property Manager can be used in this way.

## Editing Values

Click any key to view its values. Right-click in the list to add a new string, binary, DWORD, multi-string, or Expandable String value. Enter a new name right away, or right-click the value name later to rename it.

Click in the value data column to modify the value. You must also select whether a DWORD value is decimal or hexadecimal.

Note that the string [~] is the separator for strings in multi-string data as it is stored in the project and displayed in the "Destination computer's registry data" pane. This separator is not included when the registry data is created on the target system.

You can use any Windows Installer property as a registry key's value by placing it in square brackets—[INSTALLDIR], for example.

You can include values in the form "[INSTALLDIR]\filename" if you want a value to be set at run time based on the actual value of INSTALLDIR.

Right-click a key's value name to set a key path for a component.

Right-click a key's value name and toggle the "Remove during uninstall" menu item to specify whether the value is uninstalled when its associated component is uninstalled. (If the value's parent key is uninstalled, the value is uninstalled regardless of the option you select here; to prevent the parent key from being uninstalled, set its "Shared among several applications" flag as dicussed in the following section.)

Right-click a value and select Delete to remove it from the key.

## 使用注册表标志

Registry flags allow you to control the persistence and installation of your registry entries. By default, your registry entries are installed if the component to which they belong is installed. They are then uninstalled when that component is removed.

To set a registry flag, right-click the key you would like to flag. See Registry Flags for more information.

## 附加功能

Right-click a registry hive and select Import REG File to import registry data.

All entries under HKEY_USER_SELECTABLE are written under HKEY_CURRENT_USER in a per-user installation or under HKEY_LOCAL_MACHINE in a per-machine installation.