共用方式為


Session.ComponentCurrentState 屬性

Session物件的ComponentCurrentState屬性是唯讀屬性,會傳回所指定元件的目前安裝狀態。 如需狀態值,請參閱 ComponentRequestState 屬性。

這個屬性是唯讀的。

Syntax

propVal = Session.ComponentCurrentState

屬性值

要求之元件的必要字串名稱,主鍵會寫入元件資料表。

備註

如果屬性失敗,您可以使用 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
Msi.dll
IID
IID_ISession定義為 000C109E-0000-0000-C000-0000000000046

另請參閱

工作階段

ComponentRequestState 屬性