Skip to main content

Active Setup & Its Use

What is Active setup:
  1. Active setup is a process that runs automatically during the login.
  2. It is mainly used to complete specific run once setup tasks for each user as they log in to a given machine after an active setup based package is installed.
Do not confuse that active setup is only used when user entries are there. it can be used even if there are other changes which needs to be made when any user logs in.
It can be regarding placing a file somewhere, or running a script while anyone logs in.
In the stubpath value such scripts are written.
So stubpath does not necessarily mean msiexec /fpu. It can be anything which you want to run.


When to use Active Setup:
1.    Active Setup is used when the application requires user based components such as HKCU registries and/or Configuration files to run, But the application has no Advertised shortcuts or Entry points.
2.    Most common examples are Office Addins. These Addins do not have shortcuts or entry points, and in enterprise deployments they are installed by System accounts. In this scenario the current user registries will be installed to Adminstrator’s profile and not the user profile.
3.    Donot use Active setup when the application has advertised shortcuts as this will unnecessarily increase the login time for the users.

Windows looks to the Active Setup area of the machine profile (HKLM) and sees if it matches the current user profile (HKCU) copy of the subkey, runs any jobs necessary and then makes HKLM and HKCU match (signifying jobs have run and not need to run again).
keep in mind that like a logon script it runs with user credentials and so cannot manipulate HKLM or write to most areas outside of the profile so take care and use this strictly for user profile related changes
The version field delimiter needs to be a comma. if you want to put in a version equivalent to the product version, eg 3.5.75 then you need to specify it as 3,5,75 within active setup otherwise it does not get processed correctly.

Active setup:
1.       Active Setup
2.       Install Active Setup – Version Increment (Version Increment is the actual word. IAS is not used in Packaging Community, used for better understanding only)
3.       Uninstall Active Setup

How to use Active Setup:

Create a registry entry in:
hklm/s/w/ms/AS/installedcomponents/{Name of AS, generally prod code}
Where the value in stubpath will be: msiexec /fpu {ProdCode} /qb
(this command is applicable only if the application needs repair)
And the value in version will be: 1,0
Note: we can put any value in the version value and not only 1. If it has been set as n,0 then after the user login, hkcu AS version will be n,0.


Install AS(aka Version Increment): it runs on every login of a user.

How to Implement: it can be used by using CA triggered which will increment the version of AS on every login of a user.


Uninstall AS: it is used when a clean uninstallation does not occur. Also can be said, it is used whenever user related entries do not get removed even after uninstalling the application.

How: create a CA (which will trigger while uninstalling only i.e. at REMOVE=ALL) and in CA create a script to create AS hive in hklm.
Inside the AS hive, we will write another script to apply in the stubpath.
In the stubpath script, it will mention to remove all those registries and files which are in user hive.


In case of hkcu values are needed to be included, create a separate feature for all these hkcu values so that Windows Installer takes lesser time for self-healing, by only repairing one feature on user’s first login.

Comments