Custom Action Settings. Open topic with navigation. Install. Shield 2. Spring. Project: Use the Custom Actions and Sequences view to configure custom action settings in the following project types: Use the Custom Actions view to configure custom action settings in the following project types: Note that some custom action types are not available in some project types. The settings in the Custom Actions and Sequences view (or Custom Actions view) are organized into the following categories: To learn about displaying action information on the progress dialog and in the installation's log file, see Using Action Text.
The following custom action settings are available in the Action area. Custom Action Settings in the Action Area. Setting. Description. Function Name. Note: This setting applies to Install. Script custom actions.
In the list of functions that are included in the project's Install. Script files, select the Install. Script function that you want to call. DLL File Name. Note: This setting applies to standard DLL custom actions that are stored in the Binary table or located in the target system's search path. This setting also applies to MSI DLL custom actions that are stored in the Binary table.
Command Line argument for custom action. Parameters are passed as. Custom Action Settings in the Action Area. Note: This setting applies to InstallScript custom actions. In the list of functions that are included in the project's InstallScript files.
InstallScrip MSI Project (InstallShield 11.5) How do you pass parameters to command line through. So the code for the command line action would be. Or do you have a custom action doing the. Hi, I am using Installed Shield Professional 11.0. I added a custom action to execute a batch file. This batch file required some parameters (or command line arguments). How can I pass command line arguments to this batch file.
Command Line; Features and Functionality; Tutorials. If the installer encounters the ForceReboot action.
Installshield Custom Action Command Line Parameters Linux
For the Binary table location: Enter the path to the DLL file that you would like to use for your custom action. As an alternative, you can select it from the list of available DLL files in the Binary table, or click the ellipsis button (..) to browse to it. For the target system's search path location: Enter the name of the DLL file that you would like to use for your custom action. As an alternative, you can click the ellipsis button (..) to browse to it. Only the file name is needed, since the custom action searches in the target system's search path to find this DLL.
If the custom action type is an MSI DLL, the DLL file must comply with the required Windows Installer function signature. To learn more, see Calling Functions in Windows Installer DLL Files.
DLL Filekey. Note: This setting applies to standard and MSI DLL custom actions that are installed with the product. In the list of DLL files that are included in your project, select the DLL file that you would like to use for your custom action. Function Signature. Note: This setting applies to standard DLL custom actions.
To specify the parameters for the entry- point function in your DLL file, click the ellipsis button (..) in this setting. This opens the Function Signature dialog box, which has various settings that let you specify the function name, arguments, return type, and return property for the entry point function in your standard DLL. Function Name. Note: This setting applies to MSI DLL custom actions. Enter the name of the function in the MSI DLL that you would like to call. Executable File Name. Note: This setting applies to executable file custom actions that are stored in the Binary table.
Enter the path to the executable file that you would like to use for your custom action. As an alternative, you can select it from the list of available executable files in the Binary table, or click the ellipsis button (..) to browse to it. Executable Filekey.
Note: This setting applies to executable file custom actions that are installed with the product. In the list of executable files that are included in your project, select the executable file that you would like to use for your custom action. Working Directory. Note: This setting applies to executable file custom actions that are located in a path that references a directory. Enter the working directory name for the executable file that you would like to use for your custom action, or select it from the list of available directories. File Name & Command Line.
Note: This setting applies to executable file custom actions that are located in a path that references a directory. Enter path and name of the executable file that you would like to use for your custom action. If appropriate, you can include any command- line parameters that should be passed to the executable file. Use quotation marks around long file names.
Enclose long file names within quotation marks. Assembly File. Note: This setting applies to custom actions that use a managed assembly whose location is set to Binary table. Specify the . NET assembly file that you want to use for your managed- code custom action.
You can select the Browse to file option to specify the file, or select the file from the list of DLL and . Binary file. At build time, Install.
Shield adds the managed assembly to a C++ Windows Installer wrapper DLL and adds the wrapper DLL to the Binary table of your . The wrapper DLL contains the information that is required to mediate, load, and run your assembly. Assembly Filekey. Note: This setting applies to custom actions that use a managed assembly installed with the product. To specify the managed assembly that you want to use for your custom action, select the file from the list of DLLs and . Assembly Property. Note: This setting applies to custom actions that use a managed assembly whose path references a property or a directory in the Directory table.
To specify the managed assembly that you want to use for your custom action, do one of the following. You can add a string after the property if appropriate. The resulting path should indicate the location of the assembly file. Method Signature. Note: This setting applies to custom actions that use a managed assembly. Click the ellipsis button (..) to launch the Method Signature dialog box, which is where you specify arguments and return values for the managed method. When you have specified signature information on this dialog box, Install.
Shield uses it as the value of the Method Signature setting. To learn more, see Specifying the Signature for a Managed Method in an Assembly Custom Action. Error Message. Note: This setting applies to custom actions that trigger an error message. 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 (.
If the location that you specified is stored in the Binary table, you can click this ellipsis button (..) in this setting to browse to the file. For target system requirements, as well as other information about this type of custom action, see Calling a Power. Shell Custom Action. Power. Shell Script File. Key. Note: This setting applies to Power. Shell custom actions that use a Power. Shell script that is installed with the product.
To specify the Power. Shell script file (. Power. Shell files that are included in your project. For target system requirements, as well as other information about this type of custom action, see Calling a Power. Shell Custom Action. Return Processing. Specify how the custom action thread should be processed.
Only options that pertain to the selected type of custom action are available in this list. In- Script Execution. Select which iteration of the sequence will trigger your action. For details about each option, see In- Script Execution.
These options copy the action code into the execution, rollback, or commit script. If you select a Terminal Server Aware option, the custom action impersonates the user during per- machine installations on terminal server machines. Execution Scheduling. Specify how many times you want the action to run. For example, if an action is listed in both the user interface and execute sequences, it can be set to run both times, or it can run only once. Available options are.
Therefore, it could run in the user interface sequence and again in the execute sequence. The action is skipped in the execute sequence if the user interface sequence has run. If the execute sequence runs in the same process as the user interface sequence, the installation skips this action in the execute sequence. This scheduling lets you avoid rerunning actions that modify session state such as properties.
If you selected anything other than Immediate execution in the In- Script Execution setting, the Execution Scheduling setting is not available and is set to Always execute. Project: The Execute only once option does not work for Install. Script MSI projects. If your custom action exists in both the user interface and execute sequences, it is executed twice. This is because—in an Install. Script MSI project—the Install.
Script engine executes the user interface sequence and Windows Installer executes the execute sequence. Silent Mode. Note: This setting applies to standard DLL custom actions. Specify whether you want the installation to suppress a warning message if the custom action fails to load the DLL file and call the function.
MSI Type Number. This read- only setting identifies the Windows Installer numeric value for the selected custom action. For more information about basic custom action types, see Custom Action Type Overview. Comments. Enter any internal comments that you want to record for this custom action.
These comments are for your reference only and are not displayed to end users. Help File Path. Click the ellipsis button (..) to browse to the file that describes the behavior of the custom action. The file should be a text- based file such as a . At build time for Basic MSI, DIM, Install. Script MSI, and Merge Module projects, Install. Shield streams the contents of this file into the Description column of the ISCustom.
Action. Reference table. If you are working on a project in Direct Edit mode, Install. Shield streams the contents of the file that you select into the Description column of the ISCustom. Action. Reference table as soon as you select the help file. In addition, Install.
Shield makes this setting read- only and displays . This is especially helpful if system administrators deploy your product to enterprise environments; they sometimes need to know what the custom actions do.
Custom Actions List. This article describes properties that are particular to each. Advanced Installer. Generic properties are. Custom Action Properties. Launch attached file. Launch installed file.
Launch file. Open URLLaunch file from property. Launch EXE with working directory. NET Installer Class action. Set installer property. Set directory path. Call function from attached native DLLCall function from installed native DLLCall function from standard DLLExecute inline script code. Run Inline Windows Power.
Shell Script. Run Windows Power. Shell Script From File. Display error message.
Display message box. Close application. Detect process. Terminate process. Detect service. Stop service. Check if user exists. Query SQL database for data. Test ODBC connection.
Send install information to your web server. Browse for file. Predefined custom actions for working with Combo. Box. controls. Predefined custom actions for working with List.
Box. controls. Update MSI edit controls. Resolve known folder path. Start image slideshow. Stop image slideshow.
Check TCP port. Get a free TCP port. Preserve Install Type of the old version. Uninstall previous versions. Add network location.
Remove network location. Get free disk space. Play audio file. Install MSI relative to package. Configure MSI with specific Product Code.
Collect features without CABDisable Features. Update Features Install States. Launch attached file. Using this type of custom action you can execute an.
EXE or DLL) or run a script (VB or Java script) which is. This usually happens when this. This source file will be embedded in the MSI file but will. Properties. Attached File - the path to the custom action file. You can. use the . By. default, this type is set depending on the extension of the file.
This only. works for attached custom actions. Function / Command Line / Properties - represents: The. DLL, Java. Script. VBScript type). In the case of a DLL the list will be. The command line arguments (in the case of a custom action. EXE type). In this case, the command line arguments are. Formatted Type and thus.
Usually they will specify. Note that it is not. MSI package to an installation.
Action Data - represents the value of the Custom. Action. Data. property. This property can be retrieved as a regular property. Deferred custom actions and it is available only for DLL. JScript and VBScript custom actions. A common usage scenario is to.
Custom. Action. Data property in Rollback. Custom Actions, since they are also deferred.
Deferred custom actions can receive information about the. Custom. Action. Data. However, this type of custom actions do not have. Launch installed file This custom action is an application (EXE or DLL) or a. VB or Java script) included in the MSI package.
It behaves as. an attached custom action ,but it must be scheduled after the files. Properties The usage of the fields is identical to the one described. Attached Custom Actions. Launch file. This is a predefined attached custom action.
It allows the. launching of a file into execution or opening of a folder (the same. Explorer). Properties. File To Launch - field should contain the full path of the. This field is of Formatted Type and thus it can include. For example, if the.
Run As Administrator - launch the target file as an. Administrator (the equivalent of Run As..
This will make the OS (Vista, and above) show. Use 6. 4- bit Launcher - the file is launched using a 6. Open URLThis custom action uses the supplied URL to open a page in. Launch file from property. This custom action calls an executable or a script launched. The path to the executable file is specified.
Properties. Property - the name of the property that contains the path to. The name of the property is not placed. This field is of Formatted Type so you can use the. This file has a. designated folder as Working Directory. When creating a .
Quotation. marks must be used around long file names or paths. This field is. of Formatted Type. The. assembly must have a class that inherits the Installer. Run. Installer attribute set to.
Assembly Target Platform. Custom actions are created and conditioned depending on. A single custom action will be created to run on any. A single custom action will be created to run only on. Any CPU - Two custom actions will be created and conditioned. You can also modify the execution conditions as. Assembly. Dll Path - Represent the assembly that will be launched with.
It must have a class that inherits. Installer classes and the. Run. Installer attribute set to. Configure file path - This path represents the location where. Net. Cust. Act. Launcher will create the assembly's configuration. The configuration file contains the .
Net. Framework required. This field is of Formatted Type. Smart Edit Control. Installer Class Parameters. The assembly custom action requires some predefined.
In addition, you can add new parameters in order to pass. NET custom action. You can add or edit parameters using the . NET Installer Class Argument Dialog.
Predefined parameters: Action - specifies the Installer class method that will be. It can have one of the following values: . If you move the custom action. Action parameter. When you create a custom action for.
Install, Uninstall. Rollback or Commit.
Action parameter to the correspondent. Install. Type. Log. File - specifies the name of the log file where install. If empty then no log will be created.
Req. Version - specifies the version of the . NET Framework. required by the assembly. Advanced Installer automatically determines the. You can't remove predefined parameters. Debug the method of the . NET Installer Class Action. A quick way to Debug the.
Net Installer Custom Action can be found here. Set installer property. This custom action sets a property from a formatted text. Properties. Property - the name of the property to be formated.
The name. of the property is not placed between brackets ( . This field is of Formatted Type so you can use the. Use the. . This is. Formatted Type. Use the.
You can find a sample DLL and its project in the Serial Number Validation DLL. The target DLL will be embedded in the MSI file but will not. This. action has the same options as the Launch attached file custom action. Call function from installed native DLLUsing this type of custom action you can call a function from. DLL. You can find a sample DLL and its project in the Serial Number Validation DLL. The target DLL must be installed by your package and must. This action has the.
Launch attached. file custom action. Call function from standard DLL This predefined custom action can be used to call a function.
Unlike native dll custom action where the called. The dll file from which the function is called must be.
You can do this in the. Files and Folders Page by either adding it as a regular. DLLPath - specifies a formatted string that resolves to an. DLL. 6. 4- bit - this option configures the custom action to call a.
DLL file. Function. Return Type - specifies the type of value returned by the. Return Property - the name of the property where will be. Calling Convention - the calling convention to use when the. Name - the name of the function from DLL to be called. Arguments. The list with the function's arguments. There can be. any number of arguments.
You can change the order of arguments using the . You cannot successfully use any installer function which. MSIHANDLE parameter because you cannot explicitly pass. Execute inline script code. This custom action is basically a small VBScript or JScript. Properties. 64- bit script - specify whether this is a 6. Action Data - represents the value of the Custom.
Action. Data. property. This property can be retrieved as a regular property. Deferred custom actions and it is available only for DLL. JScript and VBScript custom actions. A common usage scenario is to. Custom. Action. Data property in Rollback. Custom Actions, since they are also deferred.
Deferred custom actions can receive information about the. Custom. Action. Data.
However, this type of custom actions do not have. Script Type - select the type of the script from the drop- down. Script Text - edit this field with the body of the script. The installer attaches the. Session Object to the script with the name . Because the. Session object may not exist during an installation rollback, a.
Session object. Here is an example of a . This field is of Formatted Type, so you can pass in the script results from other. Script Text - edit this field with the body of the script. Their values will be assigned to the. Ps. Param and. $second.
Ps. Param parameters in the. Power. Shell script. You need to update the. Param() block of the script, which must.
Param($first. Ps. Param, $second. Ps. Param). # your script code here. Setting a property value from a script (for immediate custom.
To set a property simply include a line with the. AI. It. does not work if the execution time is set to .
Also, the properties. Shell script runs.
Run Windows Power. Shell Script From File. This custom action runs a Power. Shell script from a file. Properties. Script from disk - specify the file path of the Power.
Shell. script that will be available on the target machine hard drive. This field. has Formatted Type so you can insert. This path can point to an installed file from the Files and Folders Page if the custom action: - is. Install. Files standard action. Add Resources action group- has.
When the system is being modified. Attached script - use the . It won't be installed on the target. Script - specify whether the Power. Shell script is. 6.
To get/set MSI properties, please see Run Inline Windows Power. Shell Script custom action. Display error message. This custom action enables the stopping of the installation. An error message will. The condition for stopping the install process must be. This field has Formatted Type so you.
Localize it by referencing properties. How to localize the value of a property based on the OS. When set to Deferred type this. The property will be set to one of the.
IDABORTAbort button was selected. IDCANCELCancel button was selected. IDCONTINUEContinue button was selected.