Installer.FeatureState 屬性

唯讀 FeatureState 屬性會傳回功能的已安裝狀態。

這個屬性是唯讀的。

Syntax

propVal = Installer.FeatureState

屬性值

備註

此屬性會傳回下列其中一個值。

值 Description
msiInstallStateAbsent 未安裝此功能。
msiInstallStateAdvertised 此功能已公告。
msiInstallStateLocal 此功能已安裝在本機執行。
msiInstallStateSource 此功能會安裝為從來源執行。
msiInstallStateInvalidArg 不正確參數已傳遞至 函式。
msiInstallStateUnknown 產品名稱或功能識別碼不明。
msiInstallStateBadConfig 組態資料已損毀。

 

 

FeatureState屬性不會驗證此功能是否可供存取。

規格需求

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

另請參閱

MsiQueryFeatureState