E
dit
A
ttach
P
rintable
r2 - 2015-01-14 - 16:36:10 - Main.syeshin
You are here:
TWiki
>
Deployment Web
>
DeploymentInstallingUpgradingAndMigrating
>
InstallingUpdatingScriptingWithInstallationManager
<div id="header-title" style="padding: 10px 15px; border-width:1px; border-style:solid; border-color:#FFD28C; background-image: url(<nop>https://jazz.net/wiki/pub/Deployment/WebPreferences/TLASE.jpg); background-size: cover; font-size:120%"> ---+!! Installing, updating, and scripting installations for IBM Installation Manager %DKGRAY% Authors: Main.MarkGuertin<br> Build basis: IBM Installation Manager %ENDCOLOR%</div></sticky> <!-- Page contents top of page on right hand side in box --> <sticky><div style="margin:15px;"></sticky> ---++ Installing, updating, and scripting installations for IBM Installation Manager <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr valign="top"><td width="100%"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr valign="top"><td width="100%"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr valign="top"><td width="100%"> </td></tr></table></td></tr></table> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr valign="top"><td width="100%"> <p>Level: Intermediate</p> <!--TOC_BEGIN--><table border="0" cellpadding="0" cellspacing="0"><tr><td><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><h3>Contents:</h3></td></tr><tr><td> <a href="#overview">Overview</a></td></tr><tr><td> <a href="#install_im">Installing IBM Installation Manager</a></td></tr><tr><td> <a href="#update_im">Updating the installed IBM Installation Manager</a></td></tr><tr><td> <a href="#record_install">Creating response files to silently install packages</a></td></tr><tr><td> <a href="#install_options">Running IBM Installation Manager in clean mode and temporary mode</a></td></tr><tr><td> <a href="#install_package">Installing packages</a></td></tr><tr><td> <a href="#install_license">Installing package licenses</a></td></tr><tr><td> <a href="#modify_package">Modifying packages</a></td></tr><tr><td> <a href="#update_all">Updating all installed packages</a></td></tr><tr><td> <a href="#uninstall_package">Uninstalling packages</a></td></tr><tr><td> <a href="#uninstall_im">Uninstalling IBM Installation Manager</a></td></tr></table></td></tr></table><!--TOC_END--> <blockquote></blockquote> <h3><a name="overview"><span>Overview</span></a></h3> <p>The following article describes how to install and update IBM<sup>(R)</sup> Installation Manager, as well as how to use it to install and update packages using Windows<sup>(R)</sup> scripts.<br /></p> <h3><a name="install_im"><span>Installing and Updating IBM Installation Manager</span></a></h3> <p>First of all, you should understand the difference between these two items: <ul> <li><b>IBM Installation Manager Kit:</b> The kit provides a directory that contains an instance of IBM Installation Manager that installs the IBM Installation Manager. The file that starts Installation Manager is named installc.exe.</li> <li><b>IBM Installation Manager:</b> This item is the installed version of IBM Installation Manager used for all package management (install, uninstall, ...). The default install directory for Windows is the C:\Program Files\IBM\Installation Manager directory.</li> </ul> </p> <p>You must use the IBM Installation Manager Kit to install IBM Installation Manager on a client computer. You can also use the IBM Installation Manager Kit to update it. If an older version of IBM Installation Manager is installed, the IBM Installation Manager Kit can update the IBM Installation Manager to that version. If the version of the installed IBM Installation Manager is the same as that of the IBM Installation Manager Kit or newer, the IBM Installation Manager on the system will stay the same. The following fragment is from the main installation script:</p> <p> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> @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.bat</pre></td></tr></table><br /> </p> <p>The following fragment runs the IBM Installation Manager kit to install the Installation Manager. The following fragment shows the content of the assertInstaller.bat script:</p> <p> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: This script runs IBM Installation Manager installer :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @if exist %HOME%\InstallerImage\installc.exe ( echo Running IBM Installation Manager installer %HOME%\InstallerImage\installc.exe -acceptLicense ) else ( echo IBM Installation Manager installer has not been found )</pre></td></tr></table><br /> </p> <p><b>Note:</b> To pass the installation location to IBM Installation Manager, you can use -installationDirectory flag option in installc command. e.g. <pre class="displaycode">installc.exe -installationLocation C:\MyInstallDir\MyIM -acceptLicense</pre> Also, you need to add -acceptLicense option to state that you agree with the Term of Use of IBM Installation Manager. </p> <h3><a name="record_install"><span>Creating response files to silently install packages</span></a></h3> <ol> <li>Use Installation Manager with the record option to create a response file; you do not have to install a package.</li> <li>Select all the desired options, and start the package installation. <p><b>Note:</b> 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.</p> <p>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.</p> <p>If you need to record an installation session of Installation Manager, you must add the following argument to the recording command line: <b>-vmargs -Dcom.ibm.cic.agent.hidden=false</b>.</p> </li> <li>The following fragment sets the IBM Installation Manager launcher and starts a recording session: <br /><br /> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> @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 )</pre></td></tr></table><br /></li> <li>After you close Installation Manager, the response file is stored to the location that you specified during its creation.</li> </ol> <h3><a name="install_options"><span>Running IBM Installation Manager in clean mode and temporary mode</span></a></h3> <p>The following fragment is an example of setting clean and temporary modes in a recorded response file: <br /><br /> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> <?xml version="1.0" encoding="UTF-8"?> <agent-input clean='true' temporary='false'> ... </agent-input> </pre></td></tr></table><br /></p> <p>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.</p> <p>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.</p> <p>If the temporary option is set to true, the setting that Installation Manager uses in the current silent installation session is not persisted.</p> <p>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.</p> <h3><a name="install_package"><span>Installing packages</span></a></h3> <p>You can use IBM Installation Manager to install packages, and use IBM Packaging Utility to copy a package to your local repository.</p> <ol> <li>You must create an Installation Manager response file, which you can use to silently install a recorded installation of a package. See <a href="#record_install">Creating response files to silently install packages</a>. <p>The output is a typical response file that you need to make minor changes to. Reference the following example:</p> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> <?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></pre></td></tr></table><br /> </li> <li>Install the package by calling the installed IBM Installation Manager Command Line Tool with the <i>input</i> option. The following fragment calls the <b>setInstallationManager</b> function to set the IBM Installation Manager silent launcher. <br /> <p>NOTE: Never use the IBM Installation Manager kit for installing packages. Always use the installed IBM Installation Manager </p> The following fragment is from the main installation script: <br /><br /> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> :::::::::::::::::::::::: MAIN SCRIPT FRAGMENT :::::::::::::::::::::::: echo Install Rational Application Developer @call :setInstallationManager call %IM_LAUNCHER% input "%HOME%\rad_install.xml" -acceptLicense @set INSTALLERRORLEVEL=%ERRORLEVEL% @if NOT %INSTALLERRORLEVEL% EQU 0 goto RAD_FAILED :::::::::::::::::::::::::: MAIN SCRIPT FRAGMENT ENDS ::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Function to set IBM Installation Manager launcher :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :setInstallationManager @if exist "%INSTALLDIR%"\eclipse\tools\imcl.exe ( echo IBM Installation Manager has been detected @set IM_LAUNCHER="%INSTALLDIR%"\eclipse\tools\imcl.exe ) else ( echo IBM Installation Manager has not been detected @goto END ) GOTO :EOF </pre></td></tr></table><br /> <p><b>Note:</b> The <b>setInstallationManager</b> 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 by using the GOTO command.</p> </li> </ol> <h3><a name="install_license"><span>Installing package licenses</span></a></h3> <p>After you install a package, you can install a package license.</p> <ol> <li>You must create an Installation Manager response file, which you can use to silently install a recorded installation of a package. See <a href="#record_install">Creating response files to silently install packages</a>. The output is a typical response file that you need to make minor changes to. Reference the following example: <br /><br /> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> <?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 --> <span class="boldcode"><preference name='offering.service.repositories.areUsed' value='false'/></span> </agent-input></pre></td></tr></table><br /> </li> <li>Install the package license by calling IBM Installation Manager Command Line Tool with the <i>input</i> option. The following fragment calls the <b>setInstallationManager</b> function to set the IBM Installation Manager silent launcher. The following fragment is from the main installation script: <br /><br /> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> :::::::::::::::::::::::: MAIN SCRIPT FRAGMENT :::::::::::::::::::::::: echo Install License Key for Rational Application Developer @call :setInstallationManager call %IM_LAUNCHER% input "%HOME%\rad_license_install.xml" -acceptLicense @set INSTALLERRORLEVEL=%ERRORLEVEL% @set INSTALLERRORLEVEL=%ERRORLEVEL% @if NOT %INSTALLERRORLEVEL% EQU 0 goto PEK_FAILED </pre></td></tr></table><br /> </li> </ol> <h3><a name="modify_package"><span>Modifying packages</span></a></h3> <p>You can use IBM Installation Manager to install or uninstall certain features of packages.</p> <ol> <li>You must create an Installation Manager response file, which you can use to silently install a recorded installation of a package. See <a href="#record_install">Creating response files to silently install packages</a>. <p>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: <br /><br /> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> <?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></pre></td></tr></table><br /> </p> <p>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: <br /><br /> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> <?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></pre></td></tr></table><br /> </p> </li> <li>Modify the package by calling IBM Installation Manager Command Line Tool with the <i>input</i> option. The following fragment calls the <b>setInstallationManager</b> function to set the IBM Installation Manager silent launcher. The following fragment is from the main installation script: <br /><br /> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> :::::::::::::::::::::::: MAIN SCRIPT FRAGMENT :::::::::::::::::::::::: echo Modify (install feature) of Rational Application Developer @call :setInstallationManager call %IM_LAUNCHER% input "%HOME%\rad_modify_install.xml" -acceptLicense @set INSTALLERRORLEVEL=%ERRORLEVEL% @if NOT %INSTALLERRORLEVEL% EQU 0 goto RAD_MODIFY_INSTALL_FAILED </pre></td></tr></table><br /> </li> </ol> <h3><a name="update_all"><span>Updating all installed packages</span></a></h3> <p>At the end of your main script, you can add a call to Installation Manager to update all the currently installed packages.</p> <ol> <li>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. <br /><br /> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> <?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> </pre></td></tr></table><br /> </li> <li>The following fragment calls the <b>setInstallationManager</b> function to set the IBM Installation Manager silent launcher. The following fragment is from the main installation script: <br /><br /> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> :::::::::::::::::::::::: MAIN SCRIPT FRAGMENT :::::::::::::::::::::::: echo Update all currently installed packages @call :setInstallationManager call %IM_LAUNCHER% input "%HOME%\updateAll.xml" -acceptLicense @set INSTALLERRORLEVEL=%ERRORLEVEL% @if NOT %INSTALLERRORLEVEL% EQU 0 goto UPDATEALL_FAILED </pre></td></tr></table><br /> </li> </ol> <h3><a name="uninstall_package"><span>Uninstalling packages</span></a></h3> <p>You can use IBM Installation Manager to uninstall packages. </p> <ol> <li>You must create an Installation Manager response file, which you can use to silently uninstall a package. See <a href="#record_install">Creating response files to silently install packages</a>. <p>This is an example of a response file that uninstalls a package. The following example uses IBM Rational Application Developer 7.0.0.2: <br /><br /> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> <?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></pre></td></tr></table><br /> </p> </li> <li>Uninstall the package by calling IBM Installation Manager Command Line Tool with the <i>input</i> option. The following fragment calls the <b>setInstallationManager</b> function to set the IBM Installation Manager silent launcher. The following fragment is from the main installation script: <br /><br /> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> :::::::::::::::::::::::: 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 </pre></td></tr></table><br /> </li> </ol> <h3><a name="uninstall_im"><span>Uninstalling IBM Installation Manager</span></a></h3> <p>You must use the IBM Installation Manager uninstaller to uninstall IBM Installation Manager on a client computer.</p> <p>The following fragment uses the <b>uninstallInstallationManager</b> function to uninstall the IBM Installation Manager. The following fragment is from the main installation script:</p> <p> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="code-outline"><pre class="displaycode"> ::::::::::::::::::::::::: 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 :EOF </pre></td></tr></table><br /><b>Note:</b> 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 by using GOTO command.</p> <br /></td></tr></table></td></tr></table><!--FOOTER_BEGIN--><!--FOOTER_END--></body></html> <sticky></div></sticky>
E
dit
|
A
ttach
|
P
rintable
|
V
iew topic
|
Backlinks:
We
b
,
A
l
l Webs
|
H
istory
: r2
<
r1
|
M
ore topic actions
Deployment
Deployment web
Planning and design
Installing and upgrading
Migrating and evolving
Integrating
Administering
Monitoring
Troubleshooting
Community information and contribution guidelines
Create new topic
Topic list
Search
Advanced search
Notify
RSS
Atom
Changes
Statistics
Web preferences
NOTE: Please use the Sandbox web for testing
Status icon key:
To do
Under construction
New
Updated
Constant change
None - stable page
Smaller versions of status icons for inline text:
Copyright © by IBM and non-IBM contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our
Terms of Use.
Please read the following
disclaimer
.
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more
here
.