Installer.FeatureState 属性

只读 FeatureState 属性返回功能的已安装状态。

此属性为只读。

语法

propVal = Installer.FeatureState

属性值

备注

此属性返回下列值之一。

值 说明
msiInstallStateAbsent 未安装该功能。
msiInstallStateAdvertised 该功能已播发。
msiInstallStateLocal 该功能安装为在本地运行。
msiInstallStateSource 该功能已安装为从源运行。
msiInstallStateInvalidArg 向该函数传递了无效参数。
msiInstallStateUnknown 产品代码或功能 ID 未知。
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