Windows Installer Basics: Advertising |
Advertising allows for the self repair of a damaged application as well as install on demand.
Bugs in your msi or Windows Installer (such as the missing files caused by pending reboot operations issue) can be worked around with suitable advertised entry points.
The identified feature and any sub-features will be repaired or installed as required. As only a single feature can be advertised (per-shortcut) a common approach is to have a "common" root (parent) folder of all other features and advertise this (see the "COMPANY_WANT_COMPLETE_FEATURE" macro).
A shortcut is one of the mechanisms that Windows Installer can use to "advertise" features.
The installation of "HKCU" registry or per-user file installation is not done via "Windows Installer Magic" but because of the advertising. Invoking the self-repair mechanism via a shortcut or other advertising mechanism will check the component keypath, which may find the component needs installation and proceed to install it.
The following advertising mechanisms described in SDK doco do not work (tested in WIN2000 and WINXP):
If a feature has the attributes "FavorSource FavorAdvertise" then the files etc will not even be installed until they are actually required (source media must of course be available at this time). Install on demand ensures minimal use of hard disk space by applications (or parts of) that a user never uses.
MSI Availability |
For a repair or installation on demand to proceed the source MSI may have to be available (its worth thinking of the CEO's laptop when he's on a plane...). Some things influencing this are:
This is a good reason to have a download directory where MSIs are kept and installed from.
Links to Advertising/Resiliency Resources |