自訂動作類型 37

此自訂動作是以 JScript 撰寫,例如 ECMA 262。 Windows Installer 不支援 JScript 1.0。 如需詳細資訊,請參閱 腳本

來源

CustomAction 資料表的 [來源] 欄位包含 Null 值。 自訂動作的腳本程式碼會儲存為 [目標] 欄位中常值腳本文字的字串。

類型值

CustomAction 資料表 的 Type 資料行中包含下列值,以指定 32 位自訂動作的基本數數值型別。

常數 十六進位 Decimal
msidbCustomActionTypeJScript + msidbCustomActionTypeDirectory 0x025 37

 

Windows Installer 可以在 64 位作業系統上使用 64 位自訂動作。 以腳本為基礎的 64 位自訂動作必須在其數數值型別中包含 msidbCustomActionType64BitScript 位。 如需詳細資訊,請參閱 64 位自訂動作。 在 CustomAction 資料表 的 Type 資料行中包含下列值,以指定 64 位自訂動作的基本數數值型別。

常數 十六進位 Decimal
msidbCustomActionTypeJScript + msidbCustomActionTypeDirectory + msidbCustomActionType64BitScript 0x0001025 4133

 

目標

CustomAction 資料表的 [目標] 欄位包含自訂動作的腳本程式碼,做為常值腳本文字字串。

傳回處理選項

CustomAction 資料表 的 Type 資料行中包含選擇性旗標位,以指定傳回處理選項。 如需選項和值的描述,請參閱 自訂動作傳回處理選項

執行排程選項

CustomAction 資料表 的 Type 資料行中包含選擇性旗標位,以指定執行排程選項。 這些選項可控制自訂動作的多重執行。 如需選項的描述,請參閱 自訂動作執行排程選項

In-Script執行選項

CustomAction 資料表 的 Type 資料行中包含選擇性旗標位,以指定腳本內執行選項。 這些選項會將動作程式碼複製到執行、復原或認可腳本。 如需選項的描述,請參閱 自訂動作In-Script執行選項

傳回值

這個自訂動作類型一律會傳回成功。

備註

以 JScript 或 VBScript 撰寫的自訂動作需要安裝 Session 物件。 安裝程式會將 Session 物件 附加至名稱為 「Session」 的腳本。 Because the Session object may not exist during an installation rollback, a deferred custom action written in script must use one of the methods or properties of the Session object described in the section Obtaining Context Information for Deferred Execution Custom Actions to retrieve its context.

Custom_Actions