Share via


Installer.ReinstallProduct 方法

Installer物件的InstallProduct方法會重新安裝產品,或修正已安裝產品中的安裝問題。

語法

Installer.ReinstallProduct(
  Product,
  ReinstallMode
)

參數

產品

指定產品的產品代碼。

ReinstallMode

指定重新安裝的類型。 此參數可以是下列一或多個值。

意義
msiReinstallModeFileMissing
只有在檔案遺失時,才會重新安裝。
msiReinstallModeFileOlderVersion
如果檔案遺失或舊版,請重新安裝。
msiReinstallModeFileEqualVersion
如果檔案遺失或版本相等或較舊,請重新安裝。
msiReinstallModeFileExact
如果檔案遺失或不是確切的版本,請重新安裝 。
msiReinstallModeFileVerify
檢查總和可執行檔,並重新安裝它們是否遺失或損毀。
msiReinstallModeFileReplace
不論版本為何,都會重新安裝所有檔案。
msiReinstallModeUserData
確保每個=使用者登錄專案都必要。
msiReinstallModeMachineData
確保每部電腦登錄專案都必要。
msiReinstallModeShortcut
驗證快捷方式。
msiReinstallModePackage
使用 recache 來源來安裝套件。

 

傳回值

這個方法不會傳回值。

規格需求

需求
版本
Windows Server 2012、Windows 8、Windows Server 2008 R2 或 Windows 7 上的 Windows Installer 5.0。 Windows Server 2008 或 Windows Vista 上的 Windows Installer 4.0 或 Windows Installer 4.5。 Windows Server 2003 或 Windows XP 上的 Windows Installer
DLL
Msi.dll
IID
IID_IInstaller定義為 000C1090-0000-0000-C000-000000000046

另請參閱

MsiReinstallProduct

安裝和設定函式