Pages

Modifying the File-Transfer Behavior for MSI's

Windows Installer (MSI) file-transfer behavior for installation and uninstallation are the following:

  1. Using the Never Overwrite component setting. 
  2. Changing the REINSTALLMODE property. 
  3. Specifying companion-file relationships. 
  4. Using the Permanent component setting. 
  5. Using the RemoveFile table to delete files created by your application.
Never Overwrite component: i work on Install shield and you can modify the Never Overwrite setting in the Components view or the Setup Design view of the InstallShield environment. If you set the Never Overwrite component property to Yes, Windows Installer will skip installing the component if its key file is already present on the target system. If the component’s key file is not present on the target system, Windows Installer will follow the normal file-overwrite behavior.

REINSTALLMODE property:The REINSTALLMODE property to modify the default file-overwrite behavior. The REINSTALLMODE property contains a string made of a collection of letters indicating how files should be overwritten. The default value is “omus”, where o indicates that older files should be overwritten with new files, m and u indicate that machine and user registry data should be reinstalled, and s indicates that shortcuts should be reinstalled. 
To modify file-overwrite behavior, you can replace the o in the REINSTALLMODE value with another letter indicating the desired behavior. Some of the possible values are e, to overwrite a file with an older or equal version, or a, to overwrite existing files without checking their version information. 

NOTE: The REINSTALLMODE value cannot be limited to a component or feature, but instead applies to all features that will be installed.

Companion-Fle:Another technique for adjusting file-overwrite behavior is to use companion files, which associate one file’s overwrite behavior to another file’s behavior. At run time, if the “parent” of the companion file relationship is installed, the “child” will be installed without regard for its version relationship with an existing file. To set up a companion file relationship, for the child’s Version data, enter the File-table key of the parent file. By default, the File-table key of a file is displayed in the rightmost (Key) column of the properties in a component’s file list.






To enter the parent file’s File-table key in the child’s version information, you can use the file’s Properties
panel, available when you right-click the file icon and select Properties. In the Properties panel, select the
“Override system version” check box, and then enter the desired Key in the version field.

Equivalently, you can enter the desired key in the Version field of the File-table record using the Direct
Editor view.

Permanent component: Another aspect of file-transfer behavior is the product’s uninstaller. If you set the Permanent property to Yes for a component, the component’s data will not be removed when the component is uninstalled. By default, when a product is uninstalled, any data installed by the installation will be removed.

RemoveFile table:a product’s uninstallation will remove only files installed by the original installation. Files created by an application after the installation is complete will not be removed automatically. If you want to remove files created by your application, you can add records to the RemoveFile table of your project. The
RemoveFile table is where you specify extra files to be removed when a given component is installed or
removed.

No comments:

Post a Comment