Share via


Installer.ConfigureFeature 方法

Installer物件的ConfigureFeature方法會設定產品功能的已安裝狀態。

語法

Installer.ConfigureFeature(
  Product,
  Feature,
  InstallState
)

參數

產品

指定產品的產品代碼。

功能

指定要設定之功能的功能識別碼。

InstallState

指定功能的安裝狀態。 此參數必須是下列其中一個值。

意義
msiInstallStateAdvertised
此功能已公告
msiInstallStateLocal
此功能會安裝在本機。
msiInstallStateAbsent
此功能已卸載。
msiInstallStateSource
此功能會安裝為從來源執行。
msiInstallStateDefault
此功能會安裝到其預設位置。

 

傳回值

這個方法不會傳回值。

規格需求

需求
版本
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

另請參閱

MsiConfigureFeature

安裝和設定函式