Home > Articles > MSI Custom Actions w/Wise Package Studio and KiXtart
 
Create EXE of KiXtart Installation Script

Using the KiXscripts Editor, the below script looks in a predefined variable used by its EXE packaged scripts named $EXECmdLine, which contains any command line switches passed to the EXE. If it contains "uninstall" an uninstall will be performed. The script will log actions or problems in the Windows Application Log. Upon installation, a shortcut is removed and the uninstall displayname value is cleared (to keep from having double entries in the Add/Remove Programs applet. Additionally, Sun has provided special switches to optionally specify the inclusion of Internet Explorer and Netscape plug-ins: to account for this the script checks for the browsers and the appropriate switches are specified. This script uses a UNC path to run the unattended installation from the network; you may also choose to include the installation files in the MSI package itself so that the installation does not need to go over the network.

Sample KiXtart Installation Script for JRE:

Next, using the KiXscripts Editor, create an EXE package using the "EXE Package Maker" feature. If KiX32.exe is not included on your target workstations, accept the default and include KiX32.exe within the executable package.

The KiXscripts Editor is available at http://www.kixscripts.com 


Figure 1: KiXscripts Editor EXE Package Maker Dialog (click for full view)

Note that the creation of EXE files from scripts within the KiXscripts Editor is a registered feature that is disabled in the demo version. Optionally, you may specify KiX32.exe as the executable and include the script within your package to be used as a command line parameter in your custom action. You may also specify CMD.EXE as the custom action executable and pass, "/c <path>KiX32.exe <path>jre_ca.kix" as a command line parameter. There are many possibilities, but a compiled executable is the easiest to implement.

Not familiar with KiXtart? KiXtart is a very powerful and easy to learn scripting language often used as a logon script processor. In most environments, it requires only a single executable to execute scripts with a wide range of functionality. A book on the KiXtart Scripting language is available at http://www.kixtartbook.com