Tuesday, December 30, 2008

Deploy MSIs that Have No Advertised Entry Points

MSI packages are great to create or edit when, after you install it, you have a shortcut to click on which will install at "first run" all the required registry settings for the current user (as long as the shortcut is advertised).

But, what happens for the current user when there is no shortcut to click on? e.g. you have an active x control to package, or an Excel add-in. No settings are setup for the new user and, more often than not, the package won't work (except for the user who installed the app).

The way around this problem is to use Active Setup registry keys.

You may have noticed when you first logon to a PC and it creates your new profile that the "Personalized Settings" box appears and sets up your personalized settings. Well, this is the Active Setup Process.

Each time a user logs in, Windows compares the:

  • "HKLM\Software\Microsoft\Active Setup\Installed Components\[PRODUCTCODE]"and
  • "HKCU\Software\Microsoft\Active Setup\Installed Components\[PRODUCTCODE]"registry keys.

If the registry entries from HKCU do not exist or they have an inferior version number than those from HKLM, then the command stored in the "StubPath" entry is executed and the appropriate entries are created in HKCU.

The only thing you need to do is add the appropriate entries in "HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\[ProductCode]".

The most important entry to include is "StubPath". If missing, nothing will be executed.
"StubPath" should have a string value such as "msiexec /fups {ProductCode} /qb".
After the package is deployed, when a user logs in, Windows will check the Active Setup registry entries and will notice that the application is not installed for the current user. In this case it will run the command line that will force the installation of the application for the user and all user files and registry keys will be installed in the appropriate locations. After that, Windows will generate the appropriate Active Setup registry entries for the installed application so the installation process won't be repeated at the next log in of the same user.

Thanks to duijsterj for this information. See the link below for the the original transcript:
http://www.symantec.com/community/article/1555/deploy-msis-that-have-no-advertised-entry-points

No comments:

Post a Comment