SharedLegacyFile Property (File)

See Also         

Specifies whether to mark this file as a shared legacy file. If you mark an installed file as a shared legacy file, the Microsoft® Windows® installer keeps reference count information about any legacy copy of the file (installed by a prior setup) it finds on the target machine. By maintaining a correct reference count for existing legacy files, the Windows installer can determine whether to delete legacy files when it uninstalls your product.

The SharedLegacyFile property is important when you install shared files that exist outside an installer component. For example, you might write or use a component that includes a shared file that already exists on the target machines. In this case, deleting the shared file when your shared component is uninstalled could break the older application that originally installed the file.

In addition, some third-party vendors distribute their shared files in formats other than merge modules (.msm files). To include such a shared file in your installer package (.msi) file, you can set the SharedLegacyFile property.

Settings

The settings for the SharedLegacyFile property are:

Setting Description
False The selected file is not marked as a shared legacy file. Any reference count information about legacy versions of the file is ignored.
True Marks the selected file as a shared legacy file. Reference count information about legacy versions of the file is maintained on the target machine when your product is installed or uninstalled.