Action Parameters Panel

InstallShield 2015 » Custom Action Wizard

The Action Parameters panel is where you specify the actual file that you call in your custom action. For example, if you call an executable file, you can browse to that file and add any command-line options.

This panel is not displayed if your custom action is running JScript or VBScript code that is stored directly within the action.

Panel Options

Source

This box behaves differently depending on the options you selected for the Type and Location lists on the Action Type panel. The following table shows the source values that you can use, depending on the type and location of each custom action.

Source Values for Custom Actions

Custom Action Type

Instructions for Setting the Source

Call a function in a standard DLL

Set the source for this custom action type according to its location.

Destination machine search path—Browse to the location of the .dll file. The wizard uses only the file name and not the path.
Installed with the product—Click Browse to open the Browse for File dialog box. In the list of destination folders, select the folder in which the .dll file is located. Then, in the list of files, select the standard .dll file.
Stored in the Binary table—Browse to the location of the .dll file.

Call a function in a Windows Installer DLL

Set the source for this custom action type according to its location.

Installed with the product—Click Browse to open the Browse for File dialog box. In the list of destination folders, select the folder in which the .dll file is located. Then, in the list of files, select the Windows Installer .dll file.
Stored in the Binary table—Browse to the location of the .dll file.

Call a public method in a managed assembly

Set the source for this custom action type according to its location.

Installed with the product—Click Browse to open the Browse for File dialog box. In the list of destination folders, select the folder in which the .NET assembly is located. Then, in the list of files, select the assembly.
Stored in the Binary table—Browse to the location of the .NET assembly.
Path referencing a Property—Select a Windows Installer property in the list, type the name of a new property, or type the name of a directory in the Directory table. The property or directory name must be enclosed within square brackets ([]). You can add a string after the property if appropriate. The resulting path should indicate the location of the .NET assembly.

Display error message and abort

The Source setting is disabled for the error custom action, since it is not applicable to this type of custom action.

Launch an executable

Set the source for this custom action type according to its location.

Installed with the product—Click Browse to open the Browse for File dialog box. In the list of destination folders, select the folder in which the executable file is located. Then, in the list of files, select the executable file.
Stored in the Binary table—Browse to the location of the .exe file.
Stored in the Property table—Select a Windows Installer property in the list. If you specify the name of a new property, you must later open the Property Manager, enter the property, and specify a value that points to the .exe file.
Stored in the Directory table—Select one of the standard folders in the list, or enter the name of a new entry into the Directory table—which you can later edit in the Direct Editor. The directory that you specify is the working directory for the target that you specify in the Target box.

Launch another .msi package

Set the source for this custom action type according to its location. (For more information about custom actions that launch another .msi package, see Nested Installations.)

Included within your main setup—Browse to the location of the “child” .msi file. The Custom Action Wizard automatically creates the appropriate entries in the Binary table.
Stored on the source media—Browse to the location of the “child” .msi file. The Custom Action Wizard automatically adds this file to the Disk1 folder in the Support Files view.
When you build a release, InstallShield copies the .msi file (but not its uncompressed application and support files) to the release location.
An application that is advertised or already installed—Browse to the location of the “child” .msi file. The Custom Action Wizard extracts the product code from the .msi package that you select.

Run InstallScript code

You cannot change the location of the InstallScript file. For an InstallScript custom action, you must select the name of the entry-point function in the list.

Run JScript or 64-bit JScript code

Set the source for this custom action type according to its location.

Installed with the product—Click Browse to open the Browse for File dialog box. In the list of destination folders, select the folder in which the .js file is located. Then, in the list of files, select the .js file.
Stored in the Binary table—Browse to the location of the JScript source file.
Stored in the Property table—Select one of the properties in the list. If you specify a new property, you must later open the Property Manager, enter the property name, and add the JScript code as the value of the property.
Stored directly in the custom action—You can use the In-Sequence Scripts panel, which provides a text editor for your JScript code.

Note: The In-Sequence Scripts panel is provided for backward compatibility only. A superior script editor is available in the Script tab of the Custom Actions and Sequences view (and the Custom Actions view).

Run PowerShell code

Set the source for this custom action type according to its location.

Installed with the product—Click Browse to open the Browse for File dialog box. In the list of destination folders, select the folder in which the .ps1 file is located. Then, in the list of files, select the .ps1 file.
Stored in the Binary table—Browse to the location of the PowerShell file (.ps1).

Run VBScript or 64-bit VBScript code

Set the source for this custom action type according to its location.

Installed with the product—Click Browse to open the Browse for File dialog box. In the list of destination folders, select the folder in which the .vbs file is located. Then, in the list of files, select the .vbs file.
Stored in the Binary table—Browse to the location of the VBScript source file.
Stored in the Property table—Select one of the properties in the list. If you specify a new property, you must later open the Property Manager, enter the property name, and add the VBScript code as the value of the property.
Stored directly in the custom action—You can use the In-Sequence Scripts panel, which provides a text editor for your VBScript code.

Note: The In-Sequence Scripts panel is provided for backward compatibility only. A superior script editor is available in the Script tab of the Custom Actions and Sequences view (and the Custom Actions view).

Set a directory

You cannot set the location when setting a Directory. You must select the name of a folder in the list, or enter a new name and specify it in the Directory table (available in the Direct Editor).

Set a property

You cannot set the location when setting a property. You must select the name of the property in the list, or enter a new name and specify it in the Property Manager.

Target

The value for the target depends on the custom action type.

Target Options

Custom Action Type

Instructions for Setting the Target

Call a function in a standard DLL

For the standard DLL type of custom action, the Target box is read-only. It displays the function definition that is specified on the Function Definition panel.

Call a function in a Windows Installer DLL

Use this box to enter the name of the function that you want to call. You do not need brackets or any other special formatting, but note that the function name is case-sensitive.

A Windows Installer .dll function has a predefined parameter and return type. For more information, see Passing Parameters to a DLL File Function in a Custom Action.

Call a public method in a managed assembly

For a managed assembly type of custom action, the Target box is not applicable. The Managed Method Definition panel, which is the next panel in the wizard for this type of custom action, is where you identify the method that you want to be invoked.

Display error message and abort

Type the error message text that should be displayed when the custom action’s conditions are met on the target system.

As an alternative, you can type a property name whose value contains the error text. The property name must be enclosed within square brackets ([]).

Launch an executable

If you are launching an executable file, you can enter command-line arguments in this box. For example, if you want to launch a readme file that is installed with you installation, you should enter Notepad.exe [INSTALLDIR]Readme.txt.

Launch another .msi package

Specify any public properties that you would like to pass to the .msi package.

Run InstallScript code

The target value is not applicable for InstallScript custom actions.

Run PowerShell code

The target value is not applicable for PowerShell custom actions.

Run JScript/64-bit JScript or VBScript/64-bit VBScript code

Enter the function name that you want to call.

Set a property or directory

Enter a formatted text string that evaluates to the new value of the property that you selected or created. See the Windows Installer Library for more information on formatted text strings.

See Also