ACTIVE SETUP AND HOW TO IMPLEMENT IT Written by Ed Tippelt, ert@pobox.com, copyright 2001-2012 Active setup is a process that runs automatically when a user logs in. Registry keys at: HKLM\Software\Microsoft\Active Setup\Installed Components\%APPNAME% and HKCU\Software\Microsoft\Active Setup\Installed Components\%APPNAME% are compared (32 bit applications), and if the HKCU registry entries don't exist, or the version number of HKCU is less than HKLM, then the specified application is executed for the current user. For 64 bit operating systems, the 32 bit Active Setup entries are migrated to: HKLM\SOFTWARE\Wow6432Node\Microsoft\Active Setup\Installed Components\%APPNAME% and HKCU\Software\Wow6432Node\Microsoft\Active Setup\Installed Components\%APPNAME% Active Setup entries made by true 64 bit applications on a 64 bit operating system will be made to the locations: HKLM\Software\Microsoft\Active Setup\Installed Components\%APPNAME% and HKCU\Software\Microsoft\Active Setup\Installed Components\%APPNAME% (Since 32 bit applications are automatically redirected to the WOW6432Node areas of the registry, there is no need to change the way that Active Setup is implemented based on operating system) If your application requires installation of components such as files or registry keys on a per-user basis, but your application has no advertised entry points or other triggers to initiate the installation process, then Active Setup is the solution. To implement Active Setup, you can package all your user installation requirements into an EXE, using SMS Installer or Wise Installation System for example, and place the EXE on the client workstation during the main application installation process. In addition, populate the following registry key with two ( REG_SZ ) values: KEY: HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\%APPNAME% - where %APPNAME% is an arbitrary string which can be the application name, or its product code GUID if using an MSI. (As long as it is unique on that workstation!) VALUE1: StubPath=\YourActiveSetup.exe VALUE2: Version=1 (If using more complex version numbers, use a comma as delimiter and not a period, eg: 1,0,3 not 1.0.3) You can also add a string to the Default value for this key, to describe the Active Setup, as this string will be displayed when Active Setup runs. To force a repair using the existing MSI where a separate Active Setup EXE is not required, you can do it this way: Create the following key structure under HKEY_LOCAL_MACHINE hive: HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\[ProductCode] Under this registry key, create a such as: "StubPath"="msiexec /fauvs {ProductCode} /qb" (The MSIEXEC options can be found in the help file MSI.CHM, which is part of the windows installer SDK.) When each user logs on for the first time after an Active Setup has been configured in HKLM, the operating system compares Active Setup keys between HKLM and HKCU, and runs the nominated executable if the HKCU entry is missing or the version in HKCU is less than HKLM. So if you ever need to update the ActiveSetup executable, just install a new version, and increment the Version registry key (VALUE2 above) in HKLM. Next time the user logs on, the active setup will run again for that user. 32 bit active setup entries in HKLM\SOFTWARE\Wow6432Node\Microsoft\Active Setup are executed before the 64 bit active setup entries in HKLM\Software\Microsoft\Active Setup. Finally, it is possible to define the order in which Active Setup commands are run - the clues are in the registry so I will leave it to you to figure this out! (Or you can email me...)