Types Of Custom ActionsBelow is a description of the custom actions used in Advanced Installer.
Attached Custom ActionUsing this type of custom action you can execute an application (EXE or DLL) or run a script (VB or Java script) which is not among your project files. This usually happens when this functionality is only useful in the installation process, but not for the installed application itself. This source file will be embedded in the MSI file but will not be deployed at install time with the other application files. Description of the fields:
Installed Custom ActionThis custom action is an application (EXE or DLL) or a script (VB or Java script) included in the MSI package. It behaves as an attached custom action ,but it must be scheduled after the files have been deployed on the target computer. Description of the fields:The usage of the fields is identical to the one described for the Attached Custom Actions. Predefined Custom ActionsLaunch File or Open URLThis is a predefined attached custom action. It allows the launching of a file into execution or opening of a folder (the same action that occurs when you double-click it in Explorer). You can also supply an URL and that page will be opened in the default browser on the target computer. This action is performed by a program that comes with Advanced Installer, called viewer.exe. Description of fields:
Command Line Examples: http://www.example.com or [#filekey] command line parameters
"[#filekey]" command line parameters Resolve Known FoldersThis predefined custom action can be used to resolve a property based folder to the path of a known folder in Windows Vista (or later operating systems).
In order to use this predefined custom action in your project, follow the steps below: 1. In the Install Parameters page, create a new public property (only upper-case letters in its name), for instance MY_VISTA_FOLDER_PROP. 2. Set the value of the property to a known folder GUID. The complete list of known folder constants can be found here. For instance, if the per-user folder FOLDERID_SavedGames ("%USERPROFILE%\Saved Games") is required, you will set the value of the property to the following GUID: {4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4}3. In the Files and Folders page create a new property based folder, specifying the property you have defined above. You can now add content to this property based folder. 4. The Resolve Known Folders predefined custom action can be added under any standard action before CostFinalize. We shall sequence it after AppSearch, for instance. 5. In the Custom Actions page, make sure that the AppSearch standard action is visible in the tree control under both InstallUISequence and InstallExecuteSequence. If it is not, use the "Show Standard Action" toolbar button or context-menu entry to make it visible. 6. Add the predefined Resolve Known Folders custom action under "InstallUISequence -> AppSearch". 7. Keeping the SHIFT key pressed, drap-and-drop the custom action in tree control, under "InstallExecuteSequence -> AppSearch". This will create a copy of the action in the InstallExecuteSequence. 8. For both instances of the custom action set the "Action Data" field to the name of the property you have defined in step 1 above (MY_VISTA_FOLDER_PROP in the example, NOT the formatted value [MY_VISTA_FOLDER_PROP]). 9. Set the Scheduling Option for the custom action to " Execute only once if present in both sequence tables". Update MSI Edit ControlsThis UI-only custom action provides a workaround for a Windows Installer issue. For more information on how to use it please see: Set Edit control text on button push. Test ODBC ConnectionYou can use this UI custom action when you want to validate user input parameters for an SQL ODBC Connection by testing the connection from within the "SQLConnectionDlg" dialog. For details please see: Test SQL Connection. Browse SQL servers on the networkYou can use this UI custom action when you want to let the installing user pick an SQL Server to connect to, from the available Microsoft SQL Servers on the network. Advanced Installer can automatically browse the network to discover any SQL Server (instances) online and populate input parameters for an SQL ODBC Connection from within the "SQLConnectionDlg" dialog. For details please see: Browse for SQL Servers. Browse For FileThis UI custom action will display an Open File dialog during the installation. See the Browse For File tutorial for details on how to configure your project. Predefined custom actions for working with ComboBox controlsPopulate ComboBox, Delete from ComboBox and Extract ComboBox Data are UI-only custom actions that can be used to populate, delete from and extract data from ComboBox controls. See the ComboBox and ListBox controls tutorial for details and sample projects. Predefined custom actions for working with ListBox controlsPopulate ListBox, Delete from ListBox and Extract ListBox Data are UI-only custom actions that can be used to populate, delete from and extract data from ListBox controls. See the ComboBox and ListBox controls tutorial for details and sample projects. Script InlineThis custom action is basically a small VBScript or JScript that is ran during the install process. Description of the fields:
Usually this script is made up of a single line. If it is longer and needs to be placed on several lines just edit the "Script Text" field with the body of the script and use the ":" character (without the quotes) to mark the place where a line ends and another begins. A custom action that is written in JScript or VBScript requires the install Session object. The installer attaches the Session Object to the script with the name "Session". Because the Session object may not exist during an installation rollback, a deferred custom action written in script does not have access to all the methods and properties of the Session object. Here is an example of a "Script Inline" custom action written in VBScript: MsgBox Session.Property("APPDIR")This custom action will prompt a message box containing the value of the APPDIR property. Error MessageThis custom action enables the stopping of the installation process if some condition is satisfied or not. An error message will be displayed to let the user know what has happened. The condition for stopping the install process must be entered in the "Execution Condition" field. Description of the fieldsError message - the message that will be displayed to the user. It is of Formatted Type so you can use the button to insert reference to files, folders and properties. Property SourceThis custom action calls an executable or a script launched with a command line. The path to the executable file is specified through a property. Description of the fields:
Property Set with FormattedThis custom action sets a property from a formatted text string. Description of the fields:
Directory Set with FormattedThis custom action enables setting a folder from a formatted text string. Description of the fields
Example:
EXE with Working DirThis custom action calls an executable file. This file has a designated folder as Working Directory. When creating a "Exe With Working Dir" type of custom action you will be prompted with a window that will allow you to choose the working directory for the executable file. Description of the fields:
MSI Database Relative to PackageThis custom action installs a MSI file. This operation is also called a nested installation. The location of the MSI file must be relative to the location of the main MSI (in the same folder or one of it's subfolders). Example:Your package is named Main.msi and is located in "c:\packages\test" and your nested install package is named Nested.msi. The Nested.msi can be located:
Description of the fields
MSI Database with Product CodeThis custom action is used to modify or remove a product installed by the current package. It may also be used to install a product that has been previously installed as advertised. The MSI is identified by it's product code. Since this type of custom action is usually used for uninstalling a product previously installed by the current package, Advanced Installer will automatically add a custom action for this purpose every time you add a nested installation.
Description of the fields
Installed .Net AssemblyThis is a custom action that launches a .Net Assembly. The assembly must have a class that inherits the Installer class with the RunInstaller attribute set to true. Description of the fields:
| |
|
| Privacy Policy | Windows Installer | Search Engine Ranking | Link Analyzer | ||
| © 2002 - 2008 Caphyon Ltd. Trademarks belong to their respective owners. All rights reserved. | ||