ICustomAction

Declaration

ICustomAction : IDispatch

Overview

This is meant to edit base custom action object.

Properties

String Name - Gets or sets the name.

Bool RunUnderLocalSystemAccount - Gets or sets Run under the LocalSystem account with full privileges (no impersonation) flag.

Bool WaitToFinish - Gets or sets the property of a custom action to execute asynchronous.

Bool FailInstallationIfReturnsError - Gets or sets the property of a custom action to cause installation fail on execution error.

String ExecutionTime - Gets or sets the installation execution time. Supported values are: “Immediate”, “Deferred”, “Rollback”, “Commit”.

ICustomActionSequence UiSequenceCondition - Gets the object that ease editing condition for execution on the “Dialogs Stage”.

ICustomActionSequence ExecuteSequenceCondition - Gets the object that ease editing condition for execution on the execution on the “Install Execution Stage”.

Methods

CreateUiSequence(String aActionName) - Add sequence in the “Dialogs Stage” for execution after a specified action name.

RemoveUiSequence() - Removes UI sequence.

CreateExecuteSequence(String aActionName) - Add sequence in the “Install Execution Stage” for execution after a specified action name.

RemoveExecuteSequence() - Removes execution sequence.

Example

      $advinst = new-object -com AdvancedInstaller
$project = $advinst.CreateProjectS(“architect”)
$appFile = $project.FilesComponent.AddFileS("appdir", "D:\MyApp.exe")
$custAct = $project.CustomActionsComponent.NewLaunchInstalledFile($appFile)
$custAct.WaitToFinish = $true
$custAct.RunUnderLocalSystemAccount = $true
$custAct.CommandLine = "/RegServer"

    

See also

ICustomActionsComponent

IFileCustomAction