Product.Context 属性

Context 属性返回此产品的上下文。

此属性为只读。

语法

propVal = Product.Context

属性值

备注

此属性可以返回下列值之一。

上下文 含义
MSIINSTALLCONTEXT_USERMANAGED 1 在托管上下文中的产品。
MSIINSTALLCONTEXT_USER 2 在非托管上下文中的产品。
MSIINSTALLCONTEXT_MACHINE 4 在计算机上下文中的产品。

 

要求

要求
版本
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 2000 上的 Windows Installer 3.0 或更高版本
DLL
Msi.dll
IID
IID_IProduct 定义为 000C10A0-0000-0000-C000-000000000046

另请参阅

产品

在 Windows Installer 2.0 及更低版本中不受支持