How to disable advertising?

Question

How to disable advertising?

One of the requirements that I've been given is disable Advertise for our product. I'm supposed to implement a "Advertise is not supported" dialog that is displayed when the user tries to install with ACTION=ADVERTISE parameter.

Do you have any tips on how to go about doing this?

Answer

To the implementation question, the Windows Installer LaunchConditions standard action. There's even a how-to article on MSDN: HOW TO: Use Launch Conditions in a Microsoft Windows Installer Package

To the design question, disabling advertising could have multiple meanings.Let's consider a few meanings...

First, one needs to consider advertising is required for group policy software installation and uninstallation. The essence of the interaction between group policy deployment and MSI is captured with the topic Advertising a Per-User Application To Be Installed with Elevated Privileges. More background can be had with the Software Installation and Maintenance white paper

Second, one needs to consider the that action property is not the only way of expressing advertising. One should consider the ADVERTISE property. This is available from the command line and can be used when ACTION=INSTALL.

Third, one needs to consider advertising support on each feature as covered by the Feature Table topic reference to msidbFeatureAttributesDisallowAdvertise. Whether this attribute is set will affect the user experiance with the SelectionTree Control, the most common way of customizing a Windows Installer package during the UI sequences.

Forth, one needs to consider whether intended target is disabling the Resiliency Windows Installer features. That's a topic for another time.

These are some design implicaitons one may also want to consider on the path toward this implementation.

[Author: Robert Flaming]

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at https://www.microsoft.com/info/cpyright.htm.