MsiReinstallFeatureW function (msi.h)
The MsiReinstallFeature function reinstalls features.
UINT MsiReinstallFeatureW( [in] LPCWSTR szProduct, [in] LPCWSTR szFeature, [in] DWORD dwReinstallMode );
Specifies the product code for the product that contains the feature to be reinstalled.
Specifies 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 MsiReinstallFeature function for each separately or use the MsiReinstallProduct function.
Specifies what to install. This parameter can be one or more of the following values.
||Reinstall only if the file is missing.|
||Reinstall if the file is missing or is an older version.|
||Reinstall if the file is missing, or is an equal or older version.|
||Reinstall if the file is missing or is a different version.|
||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.|
||Force all files to be reinstalled, regardless of checksum or version.|
||Rewrite all required registry entries from the Registry Table that go to the HKEY_CURRENT_USER or HKEY_USERS registry hive.|
||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, MIME Table, Icon Table, Extension Table, and AppID Table regardless of machine or user assignment. Reinstall all qualified components.|
||Reinstall all shortcuts and re-cache all icons overwriting any existing shortcuts and icons.|
||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.|
||The installation failed.|
||An invalid parameter was passed to the function.|
||The installation service could not be accessed.|
||The installation was suspended and is incomplete.|
||The user canceled the installation.|
||The function completed successfully.|
||The feature ID does not identify a known feature.|
||The product code does not identify a known product.|
For more information, see Displayed Error Messages.
The msi.h header defines MsiReinstallFeature as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
|Minimum supported client||Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003 or Windows XP. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version.|