Session 对象的 ComponentRequestState 属性获取 Component 表中行的操作状态的更改或者请求对其进行更改。
此属性为只读。
语法
propVal = Session.ComponentRequestState
属性值
(必需)组件项的字符串名称,Component 表的主键。
备注
| 选择状态 | “值” | 说明 |
|---|---|---|
| Null | Null | 请求不对此项执行任何操作。 |
| msiInstallStateAbsent | 2 | 要删除项。 |
| msiInstallStateLocal | 3 | 项将在本地安装。 |
| msiInstallStateSource | 4 | 要从源媒体安装和运行项。 |
| msiInstallStateDefault | 5 | 如果已安装,则以相同状态重新安装此项。 |
如果该属性失败,可以使用 LastErrorRecord 方法获取扩展的错误信息。
要求
| 要求 | 值 |
|---|---|
| 版本 |
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 |
|
| IID |
IID_ISession 定义为 000C109E-0000-0000-C000-000000000046 |