If the setup did not write any Active Setup information to HKCU, Active Setup will run the repair unnecessarily for this user.
If the version in HKCU is less than the one in HKLM or the HKCU key does not exist, Windows will copy some of the values from the HKLM key to the HKCU key and then execute the command in the “StubPath” value.Īt some point, the user who originally ran the setup will log off and then log into the computer again.
When the end user logs into the computer, Active Setup will compare the registry key in HKLM with the corresponding key in HKCU. Note that the Version value is delimited with commas, not periods.įigure 2: An InstallShield project showing the Active Setup data in HKEY_LOCAL_MACHINE This registry information is shown graphically in Figure 2, which shows an example InstallShield project with Active Setup data. HKEY_LOCAL_MACHINESoftwareMicrosoftActive SetupInstalled Components To make Active Setup work with your setup, you must have the setup write values to the following registry key: A flowchart of the process is shown in Figure 1.įigure 1: The process of executing Active Setup commands Creating Active Setup keys in InstallShield If the version information in the keys is different, then Windows runs a command specified in the HKEY_LOCAL_MACHINE key and updates the version data so that the command does not run again. The basic idea is to create a per-machine registry key in HKEY_LOCAL_MACHINE and then compare that key with a similar key in HKEY_CURRENT_USER. These are two registry keys that Windows uses to decide whether an application is installed for a user as they are logging into Windows. What about programs that don’t have shortcuts, such as add-ins for Microsoft Office? For these cases, Windows offers the Active Setup registry keys. We often see the need to repair user-specific data if one user installs a program and then a different user logs onto the computer and tries to run it.Īdvertised shortcuts work well for repairing user-specific data if the application has shortcuts. “My Documents”) and registry data in HKEY_CURRENT_USER. This is an appropriate way to repair user-specific data, including files in the user’s profile directories (e.g. If a key path is missing, Windows Installer will try to repair the application before launching the program. A Windows Installer advertised shortcut causes Windows to verify that all of the application’s component key paths are in place before launching the application. NovemAlan Burns of the things that we teach students in the InstallShield and AdminStudio training classes is to use advertised shortcuts if at all possible. Using Active Setup to Repair User Settings