MSI.ReinstallFeature

boolean MSI.ReinstallFeature (

string ProductCode,

string FeatureID,

number ReinstallMode )

Description

Calls the MsiReinstallFeature function to reinstall a feature.

Parameters

ProductCode

(string) The "product code" of the product that contains the feature to be reinstalled. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

FeatureID

(string) The identifier of the feature to be reinstalled. The parent feature or child feature of the specified feature is not reinstalled. To reinstall the parent or child feature, you must call the MSI.ReinstallFeature action for each separately, or use the MSI.ReinstallProduct action.

ReinstallMode

(number) The reinstall mode. Use the plus sign ("+") to combine values. Choose from one or more of the following:

CONSTANT

VALUE

DESCRIPTION

REINSTALLMODE_FILEMISSING

2

Reinstall only if the file is missing.

REINSTALLMODE_FILEOLDERVERSION

4

Reinstall if the file is missing or is an older version.

REINSTALLMODE_FILEEQUALVERSION

8

Reinstall if the file is missing, or is an equal or older version.

REINSTALLMODE_FILEEXACT

16

Reinstall if the file is missing or is a different version.

REINSTALLMODE_FILEVERIFY

32

Verify the checksum values and reinstall the file if they are missing or corrupt. This flag only repairs files that have msidbFileAttributesChecksum in the Attributes column of the File table.

REINSTALLMODE_FILEREPLACE

64

Force all files to be reinstalled, regardless of checksum or version.

REINSTALLMODE_MACHINEDATA

128

Rewrite all required registry entries from the Registry Table that go to the HKEY_LOCAL_MACHINE or HKEY_CLASSES_ROOT registry hive. Rewrite all information from the Class Table, Verb Table, PublishComponent Table, ProgID Table, MIMET Table, Icon Table, Extension Table, and AppID Table regardless of machine or user assignment. Reinstall all qualified components. When reinstalling an application, this option runs the RegisterTypeLibraries and InstallODBC actions.

REINSTALLMODE_USERDATA

256

Rewrite all required registry entries from the Registry Table that go to the HKEY_CURRENT_USER or HKEY_USERS registry hive.

REINSTALLMODE_SHORTCUT

512

Reinstall all shortcuts and re-cache all icons overwriting any existing shortcuts and icons.

REINSTALLMODE_PACKAGE

1024

Use to run from the source package and re-cache the local package. Do not use for the first installation of an application or feature.

Returns

(boolean) Returns true if the action was successful, or false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.

See also: Related Actions