Installations for IBM Installation Manager v1.4.2
- Overview
- Install IBM Installation Manager
- Update the installed IBM Installation Manager
- Create response files to silently install packages
- Run IBM Installation Manager in clean mode and temporary mode
- Install packages
- Install package licenses
- Modify packages
- Update all installed packages
- Uninstall packages
- Uninstall IBM Installation Manager
- About the author
Overview
The following article describes how to install and update IBM Installation Manager, as well as how to use it to install and update packages, using Windows scripts.
Install IBM Installation Manager
First of all, you should understand the difference between these two items:
- IBM Installation Manager Kit (installer):
Installer for Installation Manager and packages. To start, run: install.exe.
- IBM Installation Manager:
Installed version of IBM Installation Manager. To start, run: IBMIM.exe.
Note launcher.ini is deprecated starting with Installation Manager 1.4.3. The commands below will not work with later Installation Manager versions
You must use the IBM Installation Manager Kit to install IBM Installation Manager. Older versions of Installation Manager already installed are updated to the version in the kit. The following fragment is from the main installation script:
@set HOME=%~dp0% @set INSTALLDIR=C:\Program Files\IBM\Installation Manager echo Assert Installation Manager installed. It will be installed echo to the %INSTALLDIR% if it is not yet installed @call %HOME%\assertInstaller.batThe following fragment shows the content of the assertInstaller.bat script:
:: This script runs installer @if exist %HOME%\InstallerImage\installc.exe ( echo Running installer %HOME%\InstallerImage\installc.exe --launcher.ini %HOME%\InstallerImage\silent-install.ini ) else ( echo installer has not been found )To pass the installation location to IBM Installation Manager. You should locate the install.xml file in the InstallerImage folder and add the following installation profile definition. You should replace INSTALLDIR with the desired installation location. Alternatively, you can create a new Installation Manager response file that can silently install Installation Manager. See Create response files to silently install packages . The following fragment of a response file shows the changes that you need to make:
<profile kind='self' installLocation='INSTALLDIR\eclipse' id='IBM Installation Manager'> <data key='eclipseLocation' value='INSTALLDIR\eclipse'/> </profile> <install> <offering profile='IBM Installation Manager' ... /> </install>
Update the installed IBM Installation Manager
If you need to update the installed IBM Installation Manager, you can use IBM Packaging Utility to copy Installation Manager updates from the IBM update site to your local repository.
- Use the following response file to update the installed Installation Manager, and replace [Your repository location] with your IBM Installation Manager update repository location. This repository should be available to the computer that you will use to access it.
<?xml version="1.0" encoding="UTF-8"?> <agent-input clean='true' temporary='true' acceptLicense='true'> <server> <repository location='[Your repository location]'/> </server> <updateAll/> <!-- this prevents the Installation Manager from searching the repositories contributed by the packages which typically refer to update sites on the internet --> <preference name='offering.service.repositories.areUsed' value='false'/> </agent-input>- Update the installed IBM Installation Manager by calling IBM Installation Manager with the –input option. The following fragment calls the setInstallationManager function to set the silent launcher for IBM Installation Manager. The following fragment is from the main installation script:
::::::::::::::::::::::::: MAIN SCRIPT BEGINS ::::::::::::::::::::::::: echo Update Installation Manager @call :setInstallationManager call %IM_LAUNCHER% -input "%HOME%im_update.xml" @set INSTALLERRORLEVEL=%ERRORLEVEL% @if NOT %INSTALLERRORLEVEL% EQU 0 goto UPDATEIM_FAILED @goto END :UPDATEIM_FAILED echo Installation Manager update failed ! @goto END :END @exit %INSTALLERRORLEVEL% :::::::::::::::::::::::::: MAIN SCRIPT ENDS :::::::::::::::::::::::::: ::: :: Function to set IBM Installation Manager launcher ::: :setInstallationManager @if exist "%INSTALLDIR%"\eclipse\IBMIMc.exe ( echo IBM Installation Manager has been detected @set IM_LAUNCHER="%INSTALLDIR%"\eclipse\IBMIMc.exe --launcher.ini "%INSTALLDIR%"\eclipse\silent-install.ini ) else ( echo IBM Installation Manager has not been detected @goto END ) GOTO :EOFThe setInstallationManager function is used in all subsequent script examples. Typically, script functions are placed at the very end of a script file. To prevent the main script from going into the function body, the main script should either exit beforehand or should skip the functions block using the GOTO command.
Create response files to silently install packages
- Use Installation Manager with the –record option to create a response file; you do not have to install a package.
- Select all the desired options, and start the package installation.
You can record a response file without installing or uninstalling a product by adding the optional -skipInstall <agentDataLocation> argument. Note that <agentDataLocation> must be a writable directory.
The argument causes Installation Manager to save the installation data without installing the product. You can use the same <agentDataLocation> in the next recording session to record updates or modifications to the product, or to record license management. Note that the products installed or any preferences, including repository settings, that you set during installation without using the -skipInstall argument are not stored. Using -skipInstall makes the installation faster because Installation Manager is not installing the product, it is only recording the installation data.
If you need to record an installation session of Installation Manager, you must add the following argument to the recording command line: -vmargs -Dcom.ibm.cic.agent.hidden=false.
- The following fragment sets the IBM Installation Manager launcher and starts a recording session:
@set HOME=%~dp0% @set INSTALLDIR=C:\Program Files\IBM\Installation Manager mkdir %HOME%\sessions\ :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: This script sets IBM Installation Manager launcher :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @if exist "%INSTALLDIR%"\eclipse\IBMIMc.exe ( echo IBM Installation Manager has been detected "%INSTALLDIR%"\eclipse\IBMIMc.exe -record %HOME%\sessions\input.xml -skipInstall %HOME%\sessions\IM_DATA )- After you close Installation Manager, the response file is stored to the location that you specified during its creation.
Run IBM Installation Manager in clean mode and temporary mode
The following fragment is an example of setting clean and temporary modes in a recorded response file:
<?xml version="1.0" encoding="UTF-8"?> <agent-input clean='true' temporary='false'> ... </agent-input>If the clean option is set to false, which is the default setting, Installation Manager uses the repository and other preferences from the response file in addition to the existing Installation Manager settings. If a preference is specified in both the response file and the current Installation Manager settings, the response file takes precedence.
If the clean option is set to true, Installation Manager uses the repository and other preferences from the response file; the existing Installation Manager preference settings are not used. If a preference has a default value and it is not specified in the response file, the default value is used.
If the temporary option is set to true, the setting that Installation Manager uses in the current silent installation session is not persisted.
If the temporary option is set to false, which is the default setting, the setting that Installation Manager uses in the current silent installation session is persisted.
Install packages
You can use IBM Installation Manager to install packages, and use IBM Packaging Utility to copy a package to your local repository.
- You must create an Installation Manager response file, which you can use to silently install a recorded installation of a package. See Create response files to silently install packages .
The output is a typical response file that you need to make minor changes to. Reference the following example:
<?xml version="1.0" encoding="UTF-8"?> <agent-input clean='true' temporary='true' acceptLicense='true'> <server> <repository location='[Your repository location]'/> </server> <profile id='IBM Software Development Platform' installLocation='C:\Program Files\IBM\SDP70'> <data key='eclipseLocation' value='C:\Program Files\IBM\SDP70'/> <data key='cic.selector.nl' value='en'/> </profile> <install modify='false'> <offering features='com.ibm.rad.sdpcore,com.ibm.rad.jre' id='com.ibm.rational.application.developer' profile='IBM Software Development Platform'/> </install> <preference name='com.ibm.cic.common.core.preferences.eclipseCache' value='C:\Program Files\IBM\SDP70Shared'/> <!-- this prevents the Installation Manager from searching the repositories contributed by the packages which typically refer to update sites on the internet --> <preference name='offering.service.repositories.areUsed' value='false'/> </agent-input>- Install the package by calling IBM Installation Manager with the –input option. The following fragment calls the setInstallationManager function to set the IBM Installation Manager silent launcher. The following fragment is from the main installation script:
:::::::::::::::::::::::: MAIN SCRIPT FRAGMENT :::::::::::::::::::::::: echo Install Rational Application Developer @call :setInstallationManager call %IM_LAUNCHER% -input "%HOME%rad_install.xml" @set INSTALLERRORLEVEL=%ERRORLEVEL% @if NOT %INSTALLERRORLEVEL% EQU 0 goto RAD_FAILED
Install package licenses
After you install a package, you can install a package license.
- You must create an Installation Manager response file, which you can use to silently install a recorded installation of a package. See Create response files to silently install packages . The output is a typical response file that you need to make minor changes to. Reference the following example:
<?xml version="1.0" encoding="UTF-8"?> <agent-input clean='true' temporary='true' acceptLicense='true'> <server> <repository location='[Your license jar location]'/> </server> <install modify='false'> <offering id='com.ibm.rad.pek'/> </install> <preference name='com.ibm.cic.common.core.preferences.eclipseCache' value='C:\Program Files\IBM\SDP70Shared'/> <!-- this prevents the Installation Manager from searching the repositories contributed by the packages which typically refer to update sites on the internet --> <preference name='offering.service.repositories.areUsed' value='false'/> </agent-input>- Install the package license by calling IBM Installation Manager with the –input option. The following fragment calls the setInstallationManager function to set the IBM Installation Manager silent launcher. The following fragment is from the main installation script:
:::::::::::::::::::::::: MAIN SCRIPT FRAGMENT :::::::::::::::::::::::: echo Install License Key for Rational Application Developer @call :setInstallationManager call %IM_LAUNCHER% -input "%HOME%rad_license_install.xml" @set INSTALLERRORLEVEL=%ERRORLEVEL% @set INSTALLERRORLEVEL=%ERRORLEVEL% @if NOT %INSTALLERRORLEVEL% EQU 0 goto PEK_FAILED
Modify packages
You can use IBM Installation Manager to install or uninstall certain features of packages.
- You must create an Installation Manager response file, which you can use to silently install a recorded installation of a package. See Create response files to silently install packages .
This is an example of a response file that installs a feature of a package. The following example uses IBM Rational Application Developer 7.0.0.2:
<?xml version="1.0" encoding="UTF-8"?> <agent-input clean='true' temporary='true'> <server> <repository location='[Your repository location]'/> </server> <profile id='IBM Software Development Platform' installLocation='C:\Program Files\IBM\SDP70'> <data key='eclipseLocation' value='C:\Program Files\IBM\SDP70'/> <data key='cic.selector.nl' value='en'/> </profile> <install modify='true'> <offering features='com.ibm.rad.webtools_core' id='com.ibm.rational.application.developer' profile='IBM Software Development Platform'/> </install> <preference name='com.ibm.cic.common.core.preferences.eclipseCache' value='C:\Program Files\IBM\SDP70Shared'/> <!-- this prevents the Installation Manager from searching the repositories contributed by the packages which typically refer to update sites on the internet --> <preference name='offering.service.repositories.areUsed' value='false'/> </agent-input>This is an example of a response file that uninstalls a feature of a package. The following example uses IBM Rational Application Developer 7.0.0.2:
<?xml version="1.0" encoding="UTF-8"?> <agent-input clean='true' temporary='true'> <server> <repository location='[Your repository location]'/> </server> <profile id='IBM Software Development Platform' installLocation='C:\Program Files\IBM\SDP70'> <data key='eclipseLocation' value='C:\Program Files\IBM\SDP70'/> <data key='cic.selector.nl' value='en'/> </profile> <uninstall modify='true'> <offering features='com.ibm.rad.webtools_core' id='com.ibm.rational.application.developer' profile='IBM Software Development Platform'/> </uninstall> <preference name='com.ibm.cic.common.core.preferences.eclipseCache' value='C:\Program Files\IBM\SDP70Shared'/> <!-- this prevents the Installation Manager from searching the repositories contributed by the packages which typically refer to update sites on the internet --> <preference name='offering.service.repositories.areUsed' value='false'/> </agent-input>- Modify the package by calling IBM Installation Manager with the –input option. The following fragment calls the setInstallationManager function to set the IBM Installation Manager silent launcher. The following fragment is from the main installation script:
:::::::::::::::::::::::: MAIN SCRIPT FRAGMENT :::::::::::::::::::::::: echo Modify (install feature) of Rational Application Developer @call :setInstallationManager call %IM_LAUNCHER% -input "%HOME%rad_modify_install.xml" @set INSTALLERRORLEVEL=%ERRORLEVEL% @if NOT %INSTALLERRORLEVEL% EQU 0 goto RAD_MODIFY_INSTALL_FAILED
Update all installed packages
At the end of your main script, you can add a call to Installation Manager to update all the currently installed packages.
- Use the following response file to update Installation Manager, and replace [Your repository location] with your actual repository location. This repository should be available to the computer that you will use to access it.
<?xml version="1.0" encoding="UTF-8"?> <agent-input clean='true' temporary='true' acceptLicense='true'> <server> <repository location='[Your repository location]'/> </server> <updateAll/> <!-- this prevents the Installation Manager from searching the repositories contributed by the packages which typically refer to update sites on the internet --> <preference name='offering.service.repositories.areUsed' value='false'/> </agent-input>- The following fragment calls the setInstallationManager function to set the IBM Installation Manager silent launcher. The following fragment is from the main installation script:
:::::::::::::::::::::::: MAIN SCRIPT FRAGMENT :::::::::::::::::::::::: echo Update all currently installed packages @call :setInstallationManager call %IM_LAUNCHER% -input "%HOME%updateAll.xml" @set INSTALLERRORLEVEL=%ERRORLEVEL% @if NOT %INSTALLERRORLEVEL% EQU 0 goto UPDATEALL_FAILED
Uninstall packages
You can use IBM Installation Manager to uninstall packages.
- You must create an Installation Manager response file, which you can use to silently uninstall a package. See Create response files to silently install packages .
This is an example of a response file that uninstalls a package. The following example uses IBM Rational Application Developer 7.0.0.2:
<?xml version="1.0" encoding="UTF-8"?> <agent-input clean='true' temporary='true'> <uninstall modify='false'> <offering id='com.ibm.rational.application.developer' profile='IBM Software Development Platform'/> </uninstall> <!-- this prevents the Installation Manager from searching the repositories contributed by the packages which typically refer to update sites on the internet --> <preference name='offering.service.repositories.areUsed' value='false'/> </agent-input>- Uninstall the package by calling IBM Installation Manager with the –input option. The following fragment calls the setInstallationManager function to set the IBM Installation Manager silent launcher. The following fragment is from the main installation script:
:::::::::::::::::::::::: MAIN SCRIPT FRAGMENT :::::::::::::::::::::::: echo Uninstall Rational Application Developer @call :setInstallationManager call %IM_LAUNCHER% -input "%HOME%rad_uninstall.xml" @set INSTALLERRORLEVEL=%ERRORLEVEL% @if NOT %INSTALLERRORLEVEL% EQU 0 goto RAD_UNINSTALL_FAILED
Uninstall IBM Installation Manager
You must use the IBM Installation Manager uninstaller to uninstall IBM Installation Manager on a client computer.
The following fragment uses the uninstallInstallationManager function to uninstall the IBM Installation Manager. The following fragment is from the main installation script:
::::::::::::::::::::::::: MAIN SCRIPT BEGINS ::::::::::::::::::::::::: echo Uninstall Installation Manager @call :uninstallInstallationManager @goto END :END @exit :::::::::::::::::::::::::: MAIN SCRIPT ENDS :::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Function to run IBM Installation Manager uninstaller :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :uninstallInstallationManager @if exist "%INSTALLDIR%"\eclipse\IBMIMc.exe ( echo Uninstalling IBM Installation Manager "C:\Documents and Settings\All Users\Application Data\IBM\Installation Manager\uninstall\uninstallc.exe" --launcher.ini "C:\Documents and Settings\All Users\Application Data\IBM\Installation Manager\uninstall\ silent-uninstall.ini" ) else ( echo IBM Installation Manager has not been detected @goto END ) GOTO :EOFTypically, script functions are placed at the very end of a script file. To prevent the main script from going into the function body, the main script should either exit beforehand or should skip the functions block using GOTO command.