Managed Method Definition Panel

InstallShield 2015 » Custom Action Wizard

The Managed Method Definition panel is where you specify the public class method in the managed assembly. The Custom Action Wizard displays this panel only if you selected Call a public method in a managed assembly in the Action Type panel.

The Managed Method Definition panel has the following settings.

Settings on the Managed Method Definition Panel

Setting

Description

Class

Enter the public class with which the method is associated. As an alternative, click the Browse button to display the Method Browser dialog box. This dialog box lets you select the public method from the list of public classes that are available in the managed assembly that you selected on the Action Parameters panel.

Note: The browse functionality is available only if the .NET Framework is installed. In addition, it is available only if the location of the managed assembly is set to the Binary table or installed with the product—not if the assembly’s path references a property or a directory in the Directory table.

Also note that the browse functionality is available for only 32-bit assemblies and for Microsoft intermediate language (MSIL) files. It is not available for 64-bit assemblies.

Method

Enter the public method that you want your installation to call. As an alternative, click the Browse button to display the Method Browser dialog box. This dialog box lets you select the public method from the list of public classes that are available in the managed assembly that you selected on the Action Parameters panel.

Note: The browse functionality is available only if the .NET Framework is installed. In addition, it is available only if the location of the managed assembly is set to the Binary table or installed with the product—not if the assembly’s path references a property or a directory in the Directory table.

Also note that the browse functionality is available for only 32-bit assemblies and for Microsoft intermediate language (MSIL) files. It is not available for 64-bit assemblies.

Use custom method signature

To use the default method signature, clear this check box. For the default method signature, the installation calls the method with an MsiHandle parameter if the signature has one or more void parameters, or if it has a single MsiHandle parameter.

To use a custom method signature, select this check box. Then specify the arguments and return property as needed.

If you specified a class and a method by clicking the Browse button, InstallShield automatically adds any associated parameters. Specify the value for each parameter that you want to pass to the method.

For detailed information about specifying the method’s signature, see Specifying the Signature for a Managed Method in an Assembly Custom Action.

Arguments

If you are using a custom method signature, specify the list of arguments that you want to pass to the selected method.

If you specified a class and a method by clicking the Browse button, InstallShield automatically adds any associated parameters to the grid in this area.

To use a property as an argument, click the value field for the parameter, and then select the property from the list.

The context menu provides you with options for working with arguments. To access the context menu, right-click an argument in the Arguments grid. The available context menu commands are:

Add—Add an argument to the grid.
Remove—Delete an argument from the grid.

This grid is available only if the Use custom method signature check box is selected.

For more information about specifying the arguments, see Specifying the Signature for a Managed Method in an Assembly Custom Action.

Return Property

Select the name of the property whose value will be set to the method’s return value.

This list is available only if the Use custom method signature check box is selected.

For more information about specifying the return property, see Specifying the Signature for a Managed Method in an Assembly Custom Action.

See Also