IPowershellAttachedScriptFile

Declaration

IPowershellAttachedScriptFile : ICustomAction

Overview

This interface facilitates editing custom action that allows launching an attached Powershell script file into execution.

Properties

String ScriptFileSource - Gets or sets the source path to the attached script file.

Bool Is32Bit - Gets or sets the property of the custom action to run the 32-bit PowerShell executable. If Is64Bit value is also “true” then runs the Operating System bitness PowerShell executable (32-bit on x86 operating systems, 64-bit on x64).

Bool Is64Bit - Gets or sets the property of the custom action to run the 32-bit PowerShell executable. If Is32Bit value is also “true” then runs the Operating System bitness PowerShell executable (32-bit on x86 operating systems, 64-bit on x64).

Examples

      $advinst = new-object -com AdvancedInstaller
$project = $advinst.CreateProjectS(“architect”)
$custAct = $project.CustomActionsComponent.NewPowershellAttachedScriptFile("D:\my_script.ps1")

# Set “Is32Bit” and “Is64Bit” properties to true to auto detect OS bitness PowerShell executable
$custAct.Is32Bit = $true
$custAct.Is64Bit = $true

    

See also

ISearch

IAdvinstProjectTypes