Creating an installation package for Harvest Client
search cancel

Creating an installation package for Harvest Client

book

Article ID: 430788

calendar_today

Updated On:

Products

CA Harvest Software Change Manager CA Harvest Software Change Manager - OpenMake Meister

Issue/Introduction

When a new user wants to install the latest Harvest client (v14.5.01) including the new Project Instantiation Tool there are several steps involved.  This article describes a method for creating a script or SMS "push package" that can automate this installation to make it simpler for users to install.

If the installation is not completed correctly, you may find the process finishes and appears to succeed, but when opening the Administrator Tool and trying to create a broker connection an error message is returned:

com.ca.cmsdk.CmsdkException: Unable to intialize CA Harvest SCM. Please ensure that all required components are installed.Message=[Unable to intialize CA Harvest SCM. Please ensure that all required components are installed.] Key=[]
   at com.ca.harvest.core.CmsdkSessionFactory.getHarvest(CmsdkSessionFactory.java:63)
   at com.ca.harvest.ui.wizards.BrokerLoginPage.useOSAuthentication(BrokerLoginPage.java:225)
...

Environment

Harvest Software Change Manager v14.5.01 plus Instantiation Patch
Windows Operating Systems

Cause

When creating a silent installation package for Harvest SCM Client, here are a few pointers:

  1. If you're running the silent install, you need to include a step to install the VC++ 2017 Redeistributables separately. The interactive install includes them but the silent install does not.  So you should download those from the Microsoft website (both the 64-bit and the 32-bit), and install those before installing the 14.5.0 Client.  Here's the link: Latest supported redistributable version

  2. When installing any part of Harvest on a Windows platform, when both a "setup.exe" and a "msi" file are visible in the installation folder, you should always execute the setup.exe.  

  3. If setting up the install package as a Windows batch script, a challenge will be to ensure each step is completely finished before proceeding to the next step.  Just running the msi or the setup.exe when installing 14.5.0, you'll find that control is returned to the batch script while the installer is still running in the background.  You can see this if you execute "tasklist | find "setup.exe"" for example.  However adding "START /WAIT" to the command forces the batch script to wait ... at least when tested with setup.exe for the 14.5.0 install.

    A caveat is that the same doesn't work with the 14.5.1 patch installer.  Even with "START /WAIT" at the beginning of the command, the installer is still running when control returns to the batch script as seen with a command like "tasklist | find "CAHarvestSCMV145_01Patch_"".  The difficulty with this is that the InstantiationPatch step really needs to wait for the 14.5.01 patch install to finish before it starts.  A workaround is to use the "timeout" command to make the batch script wait a few minutes after the 14.5.01 patch install just to ensure it is finished before starting the InstantiationPatch install.

Resolution

Here is an example installation package that can successfully install the SCM Client v14.5.0, the 14.5.01 patch and the Instantiation Tool patch.

The installation folder contains:

C:\>tree /f InstallClient
Folder PATH listing for volume **********
Volume serial number is **********
C:\INSTALLCLIENT
│   InstallSCM.bat

├───InstantiationPatch
│       7z.dll
│       7z.exe
│       chapi.dll
│       comagent64.dll
│       Hapi.dll
│       haragent.dll
│       harzlib.dll
│       hauth.dll
│       hauthserver.dll
│       hcomm.dll
│       hutilities.dll
│       jharagent64.dll
│       jhcomm64.dll
│       jre.zip
│       jutils64.dll
│       scm_fix.bat
│       signfile.dll
│       workbench.zip
│       WorkbenchCleanUpgrade.bat

├───SCM1450_client
│   │   CA Harvest Software Change Manager v14.5 Client 64 Bit.msi
│   │   setup.exe
│   │
│   └───reginfo
├───SCM1451_client
│       CAHarvestSCMV145_01Patch_Client.exe

└───VCredist
        VC_redist.x64.exe
        VC_redist.x86.exe

Here is an example installation script that uses the above folder structure to complete the installation:

C:\InstallClient>type InstallSCM.bat
REM Install the Visual C++ redistributable packages
cd VCredist
VC_redist.x64.exe /s
VC_redist.x86.exe /s

REM Install SCM v14.5.0 full client
REM (adding "START /WAIT" to the beginning causes the script to wait until installation is complete
REM before proceeding to the next step)
cd ..\SCM1450_client
START /WAIT setup.exe /s /v"/l c:\InstallClient\client450.log /qn /norestart ACCEPTLICENSE=yes ALLUSERS=1"
tasklist | find "setup.exe"

REM Install SCM v14.5.01 full client patch
REM (adding "timeout /t 180 causes the script to wait 3 minutes before proceeding to the next step)
cd ..\SCM1451_client
START /WAIT CAHarvestSCMV145_01Patch_Client.exe /s /v"/l c:\InstallClient\client451.log /qn"
timeout /t 180
tasklist | find "CAHarvestSCMV145_01Patch_"
pause

REM Be sure to set the necessary environment variables before installing the Instantiation Tool Patch
SET CA_SCM_HOME=C:\Program Files\CA\SCM
SET CA_SCM_LOCALHOME=C:\Program Files\CA\SCM
SET HARVESTHOME=C:\Program Files\CA\SCM
SET Path=C:\Program Files (x86)\CA\SharedComponents\PEC\bin;C:\Program Files\CA\SCM\x86;C:\Program Files\CA\SCM;%PATH%

REM Install the Instantiation Tool Patch
cd ..
xcopy "InstantiationPatch" "C:\Program Files\CA\SCM\InstantiationPatch" /s /i

cd "C:\Program Files\CA\SCM\InstantiationPatch"
scm_fix.bat

The above example installation package and script is offered as-is without further support or enhancement from the Broadcom Support Team.  You should use this information as a starting point in developing an installation package that meets your specific requirements.

Additional Information

More information on the patch containing the new Harvest Administrator Instantiation Tool can be found here: Admin Instantiation Tool