1. What is Active Setup
Active Setup is a component of Windows.
It’s a registry key present in HKLM:
And HKCU:
In HKLM, each sub-key contains the following entries:
- [KeyName] is the name of the Sub-Key (Usually the UpgradeCode of the MSI)
- ComponentID is usually the name of the Application (“ProductName” MSI property value)
- StubPath is a command to execute (usually to install the user part of an application)Version is the version of the Active Setup. If the version in HKLM is greater than the version in HKCU, the StubPath command is launched at logon
Each time a user log in Windows, the system checks and compares the values of the Active Setup registry key.
If a sub-key is present in HKLM and not present in HKCU, or if the sub-key is present in HKCU but the version is less than the version in HKLM:
- The StubPath command is launched
- The version in HKCU is updated (allowing to play the Active Setup only once per user)
2. Auto-Repair with Active Setup
Usually, to set the user part of an installation, Active Setup is used to launch an auto-reparation of the MSI installing only the user part.
Here is a sample which can be used:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\**App Name**] "ComponentID"="** Application Name **" "StubPath"="msiexec /fpu [ProductCode] /qn" "Version"="1"