Prevent self-repair by removing advertised entry points

Article:TECH25496  |  Created: 2006-07-12  |  Updated: 2006-07-12  |  Article URL http://www.symantec.com/docs/TECH25496
Article Type
Technical Solution

Problem



Rather than upgrading, some developers choose to install new files into existing application directories, replacing older files. This can cause a self-repair which replaces the new files with the original (old) files.

Cause



Windows Installer performs an integrity check on .MSI-based installations when the operating system accesses an advertised entry point in the installation. It verifies the existence of key paths for each component and if the key path is missing for any component, the feature containing the component is repaired.

Solution



.MSI-based installations include specific entry points that initiate self-repair when invoked. These entry points include COM activation, advertised shortcuts, file extensions (MIME Type and Verb Activation) and direct calls to the Windows Installer. The AppId, Class, Extension, MIME, ProgID, TypeLib and Verb tables contain advertising information.

The Advertising Setting option located on the Advertising tab of the Tools > Options dialog determines how to gather self-registration and advertising information for files added to an installation. To ensure that no advertising information is added to the installation, select "Scan advertising information into registry keys" from the Advertising Settings drop down list.

COM Activation:
COM objects act as entry points to an installation. The Class and ProgID tables contain COM server-related information. To ensure that the installation has no COM object advertising information, add all COM information directly to the registry.

Advertised Shortcuts:
Advertised shortcuts make calls to a feature in the installation. This enables self-repair functionality in an installation. To prevent self-repair, unmark the Advertised checkbox for the shortcut. Alternatively, replace all advertised shortcuts with command-line shortcuts, which refer directly to file paths for execution.

File Extensions:
A file extension association creates a connection between a file extension and an executable. Some file associations contain MIME and Verb information. See attached article "File Association Self Repair" for information on how to create registry keys from File Extension information.
  • Context Menu Verb Activation: The Verb table contains command-verb information associated with file extensions.
  • File MIME Type Association: The MIME table associates a MIME type with a file extension or CLSID to generate the extension or COM server information required for advertisement of the MIME (Multipurpose Internet Mail Extensions) content.

Direct Calls to Windows Installer:
An application queries the Windows Installer for the state of a component or feature, causing a self-repair if a component is missing. For example, an application might query the Windows Installer for the state of a shared component such as the Microsoft Office spell checker, which initiates self-repair if the spell checker is not installed correctly. To ensure that self-repair does not occur due to a direct call to the Windows Installer, remove any calls to the Windows Installer from within the application itself.

Following the steps above prevents self-repair in an installation.

Note: If an end user overwrites or deletes any application file(s), Windows Installer cannot replace the file(s) and the application may no longer function correctly.


Attachments

WindowsInstallerRepair.pdf (118 kBytes)

Legacy ID



3082


Article URL http://www.symantec.com/docs/TECH25496


Terms of use for this information are found in Legal Notices