Generating InstallAnywhere Log for Install and Uninstall with InstallAnywhere 2010 and Earlier
SummaryThis article outlines the steps to generate Installation log and debug information.
This article outlines the steps to generate Installation log and debug information.
Steps to generate an InstallAnywhere standard install log:
In an InstallAnywhere project IDE,
1) Go to Project > Info tab
2) Under Installation Log, check the box for ?Generate install log during installation?
3) Plain text format is selected by default.
4) Build and run the installer
This will create an install log in text format. The install log file is created in the installed directory with the name format $PRODUCT_NAME$_InstallLog.log if it was created in text format, or with the name format $PRODUCT_NAME$_InstallLog.xml if it was created in xml format.
Steps to generate an InstallAnywhere debug install log in verbose mode:
1) In the IA project IDE, go to Project>Config> Optional Installer Arguments and in the Additional Arguments: type the following:
2) In the Installer Debug Output, set
Send stderr to: $/$tmp$/$console.txt
Send stdout to: $/$tmp$/$console.txt
User should have write permissions to the directory where a file is being created. After making these changes in the project, build the project and run the installer. This will create a file named console.txt in the specified location in the drive root.
Directory separator variable ($/$) is used to specify platform-neutral paths for the debug output and is useful when building a single installer for both windows and non windows platforms like Unix. Note that the directory separator variable is only applicable for use in these properties when using IA 2009 and IA 2010. Use absolute path (platform specific) while specifying filename for any versions prior to IA 2009.
You can also use platform specific directory separator in the above properties as shown below:
Send stderr to: \tmp\console.txt
Send stdout to: \tmp\console.txt
This will create a file named console.txt in the C:\tmp folder.
Note: To send the stderr and stdout output directly to a console window, type ?console? in the above properties in Step 2 as illustrated below:
Send stderr to: console
Send stdout to: console
You can also redirect the debug output in Windows to a console window by holding down the Ctrl key when launching the installer. This will open a console window to display the debug information.
The -Dlax.debug.level=3 -Dlax.debug.all=true can also be set through the system environmental variable on Windows.
In Non-Windows platform like Unix:
Either follow the above listed steps (Step1 and Step2 under ?Steps to generate an InstallAnywhere debug install log in verbose mode?) to send install debug output to a file, or follow the steps listed below:
1) If you have not done the Step 1 above and have already built the project, the above system properties can also be set before running the installer as shown below:
export _JAVA_OPTIONS="-Dlax.debug.level=3 -Dlax.debug.all=true"
2) Before launching the installer, set the following environmental variable to send the debug output to console:
3) Then run the installer as shown below:
install.bin 1>console.txt 2>&1
This will redirect both stderr and stdout to a file.
Generating Uninstall Log:
Follow the steps below to capture the debug output generated by the IA uninstaller:
1) Go to the Install sequence in the Project IDE
2) Expand _$PRODUCT_NAME$_installation (The uninstaller folder is listed in the User Install Folder hierarchy. The folder name is different in InstallAnywhere versions prior to 2010).
3) Click on Create Uninstaller action, which is named Change $PRODUCT_NAME$ Installation by default (in IA 2010)
4) Click on ?Edit Properties? button which is located at the bottom under the Properties tab.
5) Set the ?lax.stderr.redirect? and ?lax.stdout.redirect? to a text file as shown below:
6) Also, add a new property: ?lax.nl.java.option.additional? (without quotes) by clicking on Add button. Add lax.nl.java.option.additional in the new line under Property and add its value: ?-Dlax.debug.level=3 -Dlax.debug.all=true? (without quotes) under Value.
7) Build and run the installer
😎 After running the uninstaller, a file named console.txt should be created in the above specified directory.
You can also obtain the uninstaller debug information by doing the following in the uninstaller lax file:
1) After installation, open the Uninstaller lax file (file with .lax extension under the uninstaller folder in the Installed directory) with a text editor.
2) Set the following lines:
lax.stderr.redirect= C:\\LAXOUT.txt (in windows)
lax.stdout.redirect=C:\\LAXOUT.txt (in windows)
lax.stderr.redirect= /tmp/LAXOUT.txt (in unix)
lax.stdout.redirect=/tmp/LAXOUT.txt (in unix)
3) Also, add the following line to the bottom of the lax file:
4) Save and close the .lax file.
5) Run the uninstaller. After the uninstaller is finished, a file with the above specified name should be created in the specified location.
Based on the shell being used, the following might be used to set an environment variable:
Command Line Build Log:
The build output when running a command line build can be redirected by setting the following two properties in the build.lax file. The build.lax file is found in the IA HOME where InstallAnywhere is installed.
Setting the properties as shown above will generate a file named buildconsole.txt in the specified directory (C:\\tmp) in Windows. If only a filename is specified as shown below, then the file will be created in the same directory containing the build.lax file.
GUI Build Log:
The build output when running a GUI build through IA Advance Designer can be redirected similarly to a file by setting the above mentioned two properties in the InstallAnywhere.lax file. This file is found in the IA HOME where InstallAnywhere is installed. Note: You will need to restart the IA IDE after making the change in the InstallAnywhere.lax file.