Rational Developer Silent Install doPatch.bat
From MidrangeWiki
@echo off setlocal set hh=%time:~0,2% if "%time:~0,1%"==" " set hh=0%hh:~1,1% set dt=%date:~10,4%%date:~4,2%%date:~7,2%_%hh%_%time:~3,2%_%time:~6,2% echo ================================================================= echo Starting RDI Silent Intall %dt% echo ================================================================= :check_Permissions echo Administrative permissions required. Detecting permissions... net session >nul 2>&1 if %errorLevel% neq 0 ( echo Failure: This script needs to be run as Administrator. goto EXIT_1 ) rem set USER_IM_FOLDER=%1 rem IF ERRORLEVEL 1 ( rem set USER_IM_FOLDER="C:\IBM\Installation Manager" rem ) else if "%USER_IM_FOLDER%"=="" ( rem set USER_IM_FOLDER="C:\IBM\Installation Manager" rem ) echo Checking Installation Manager IF EXIST "C:\IBM\Installation Manager"\eclipse\IBMIM.exe ( set USER_IM_FOLDER="C:\IBM\Installation Manager" ) else if EXIST "C:\Program Files\IBM\Installation Manager\eclipse\IBMIM.exe" ( set USER_IM_FOLDER="C:\Program Files\IBM\Installation Manager" ) else ( Echo Installation Manager Not Found. echo Install Installation Manager. GOTO EXIT_1 ) set RDI_BASE_INSTALL_FOLDER=C:\Software\RationalDeveloper\RDI_V9.6 set RDI_INSTALL_FOLDER=C:\Software\RationalDeveloper\RDI_V9.6.0.1 set RDI_REMOTE_FOLDER="\\<servername>\[download_folder]" rem set RDI_REMOTE_FILES=install.xml RDI_V9.6_CORE_PI_1_EVAL_EMG.zip RDI_V9.6_CORE_PI_2_EVAL_EMG.zip set RDI_INSTALL_SCRIPT=patch.xml set RDI_REMOTE_FILES=RDI-9.6.0.1-DISK1.zip set RDI_PRODUCT_INSTALL=C:\IBM\SDP96 set RUN_LOG_FILE=%RDI_INSTALL_FOLDER%\install_log%dt%.xml rem echo Liset "%RDI_REMOTE_FILES%" rem exit /B C: IF EXIST %RDI_INSTALL_FOLDER% GOTO HAVE_INSTALL_FOLDER echo Creating "%RDI_INSTALL_FOLDER%" mkdir %RDI_INSTALL_FOLDER% :HAVE_INSTALL_FOLDER cd %RDI_INSTALL_FOLDER% echo Using Remote Location: "%RDI_REMOTE_FOLDER%" echo Using IM Folder: "%USER_IM_FOLDER%" echo Using Install Folder: "%RDI_INSTALL_FOLDER%" echo Create or Refresh Archives robocopy %RDI_REMOTE_FOLDER% %RDI_INSTALL_FOLDER% %RDI_INSTALL_SCRIPT% %RDI_REMOTE_FILES% /MT:100 if %errorlevel% gtr 1 ( echo ROBOCOPY Failed. rc "%errorlevel%" GOTO EXIT_1 ) IF NOT EXIST "C:\Program Files\7-Zip"\7z.exe GOTO NO_7ZIP "C:\Program Files\7-Zip"\7z.exe x RDI-9.6.0.1-DISK1.zip -aos -r -o%RDI_INSTALL_FOLDER% if %errorlevel% neq 0 ( echo Unzip failure. rc "%errorlevel%" goto EXIT_1 ) GOTO UNZIP_COMPLETE :NO_7ZIP echo 7zip not found. Checking if the disk folders have been manually uncompressed. :UNZIP_COMPLETE echo Checking: %RDI_INSTALL_FOLDER%\disk1 IF NOT EXIST %RDI_INSTALL_FOLDER%\disk1 ( echo Folder not found! echo %RDI_INSTALL_FOLDER%\disk1 echo You might need to uncompress the archive manually. echo Archive: %RDI_INSTALL_FOLDER%\RDI-9.6.0.1-DISK1.zip goto EXIT_1 ) echo Found: %RDI_INSTALL_FOLDER%\disk1 echo Running installation manager IF NOT EXIST %USER_IM_FOLDER%\eclipse\IBMIM.exe ( echo Installation manager not found. echo %USER_IM_FOLDER%\eclipse\IBMIM.exe goto EXIT_1 ) rem -installationDirectory rem %USER_IM_FOLDER%\eclipse\IBMIM.exe input %RDI_INSTALL_FOLDER%\%RDI_INSTALL_SCRIPT% -silent -acceptLicense -record %RDI_INSTALL_FOLDER%\install%dt%.xml -skipInstall %RDI_INSTALL_FOLDER%\testInstall -log %RUN_LOG_FILE% %USER_IM_FOLDER%\eclipse\IBMIM.exe input %RDI_INSTALL_FOLDER%\%RDI_INSTALL_SCRIPT% -acceptLicense -silent -log %RUN_LOG_FILE% if %errorlevel% neq 0 ( echo Installation manager failed. This script probably needs to be run as Administrator. IF EXIST %RUN_LOG_FILE% GOTO CHECK_ERROR_LOG goto EXIT_1 ) rem create new install script using -record and -skipInstall rem we can build update recordings by using the same agentDataLocation folder argument. rem %USER_IM_FOLDER%\eclipse\IBMIM.exe input %RDI_INSTALL_FOLDER%\%RDI_INSTALL_SCRIPT% -record %RDI_INSTALL_FOLDER%\install%dt%.xml -acceptLicense -skipInstall %RDI_INSTALL_FOLDER%\newinstall%dt% -log %RUN_LOG_FILE% :ECLIPSE_INI rem Echo Replacing %RDI_PRODUCT_INSTALL%\eclipse.ini with the version from %RDI_REMOTE_FOLDER%\eclipse.ini rem robocopy %RDI_REMOTE_FOLDER% %RDI_PRODUCT_INSTALL% eclipse.ini /MT:100 rem if %errorlevel% neq 0 ( rem echo copy of eclipse.ini failed. rc "%errorlevel%" rem goto EXIT_1 rem ) :CHECK_ERROR_LOG echo Install Finished. Checking error log for errors. rem Check If the error log contains anything other than the default warning. FC /lb1 /0 %RDI_REMOTE_FOLDER%\install_log_warningonly.xml %RUN_LOG_FILE% >NUL 2>&1 if %errorlevel% neq 0 GOTO HAVE_ERRORS_IN_LOG del %RUN_LOG_FILE% echo ================================================================= echo Install Complete %dt%. No Errors Found. echo ================================================================= goto EXIT_0 :HAVE_ERRORS_IN_LOG echo ================================================================= echo Check Log for errors "%RUN_LOG_FILE%" echo ================================================================= type %RUN_LOG_FILE% :EXIT_1 echo Exit With Failure echo ================================================================= pause exit /b 1 :EXIT_0 echo =========================end===================================== pause exit /b
Patching update installer script
patch.xml <?xml version='1.0' encoding='UTF-8'?> <agent-input> <variables> <variable name='sharedLocation' value='C:\IBM\SDPShared'/> <variable name='installLocation' value='C:\IBM\SDP96'/> <variable name='profile' value='IBM Software Delivery Platform_96'/> </variables> <server> <repository location='C:\Software\RationalDeveloper\RDI_V9.6.0.1'/> <repository location='C:\Software\RationalDeveloper\RDI_V9.6'/> <repository location='\\gofs\Departments\Programming\Downloads\RDi RDp Editors\RDi 9.x\RDI_9.6\com.ibm.rational.developer.ibmi.rpgcobol.v96.pek.jar'/> </server> <profile id='${profile}' installLocation='${installLocation}'> <data key='cic.selector.arch' value='x86_64'/> </profile> <install> <!-- IBM® Rational® Developer for i 9.6.0.1 --> <offering profile='IBM Software Delivery Platform_96' id='com.ibm.rational.developer.ibmi.v96' version='9.6.1.20171205_1338' features='com.ibm.rdi.sdpcore,com.ibm.rdi.jre,com.ibm.rdi.rpgtools,com.ibm.rdi.rpgtools.egit'/> </install> <preference name='com.ibm.cic.common.core.preferences.eclipseCache' value='${sharedLocation}'/> </agent-input>