Tuesday, February 7, 2012

Active Setup

Active Setup is the option available to expose a user profile to a one time code run.  This is used where machine installs need to apply something to the user environment the first time a user logs into a machine.  It is useful if there are no other entry points for the MSI to trigger a repair or it needs to be automated.

[HKLM\Software\Microsoft\Active Setup\Installed Components\<unique key name maybe a GUID>]
"StubPath"=<command to execute>

An example command to trigger a repair would be
msiexec /fup {MSI ProductCode GUID} /qb-!

After the first exposure of a user to the machine the associated key is created in the user profile, preventing further runs at login.

[HKCU\Software\Microsoft\Active Setup\Installed Components\<unique key name maybe a GUID>]