sd_api.dll problem on Agents installed using Deployment Wizard
search cancel

sd_api.dll problem on Agents installed using Deployment Wizard

book

Article ID: 382551

calendar_today

Updated On:

Products

CA Client Automation - IT Client Manager CA Client Automation

Issue/Introduction

When installing Agent using Deployment Wizard, the file sd_api.dll is copied via InstallTestFixes.bat script and it gets a modified date equal to installation date.
This is causing a problem when a CU patch is installed. File sd_api.dll from CU patch is not applied as installed file has a more recent modified date than file included in CU patch.

Example :


Similar problem occurs for following files of AM Agent :
amAdvInvNt.exe
amisww32.exe
amagentsvc.exe

Environment

Client Automation 14.5
Agent on Windows

Resolution

  1. On Domain Manager, go in directory C:\Program Files (x86)\CA\DSM\Packages\Public\CAUnicenterDSM

    (adapt the path with installation path of Client Automation).


  2.  Find the directory for package used in deployment wizard

    Example :

    If package used is "CA DSM Agent + Software Delivery plugin (English only Edition) 14.5.0.153 Windows_x86 ENU"



    Then go in directory : C:\Program Files (x86)\CA\DSM\Packages\Public\CAUnicenterDSM\AgentSD\12.0\ENU


  3. Go in sub directory \Windows_x86\TestFixes and open with notepad the file InstallTestFixes.bat

    And add these lines (in green and bold) :

    REM ######################## Install Test Fixes start ################################################

    echo %date% %time% Current Directory is %cd% >> %logfile% 2>&1

    echo %date% %time% Coying  %~dp0\sd_api.dll to  "%tInstallDirProduct%bin\" >> %logfile% 2>&1

    dir "%~dp0\sd_api.dll" >> %logfile% 2>&1

    copy /Y sd_api.dll  "%tInstallDirProduct%bin\"  

    echo %ERRORLEVEL%  error level for sdapi >> %logfile% 2>&1

    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -Command "$(Get-Item $Env:tInstallDirProduct'\bin\sd_api.dll').lastwritetime"=$(Get-Item $Env:tInstallDirProduct'\bin\sd_api.dll').creationtime"

    echo %ERRORLEVEL%  error level for powershell >> %logfile% 2>&1

    IF EXIST "%tInstallDirProduct%\bin\amAdvInvNt.exe" (

    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -Command "$(Get-Item $Env:tInstallDirProduct'\bin\amAdvInvNt.exe').lastwritetime=$(Get-Item $Env:tInstallDirProduct'\bin\caf.exe').creationtime"
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -Command "$(Get-Item $Env:tInstallDirProduct'\bin\amAdvInvNt.exe').creationtime=$(Get-Item $Env:tInstallDirProduct'\bin\caf.exe').creationtime"
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -Command "$(Get-Item $Env:tInstallDirProduct'\bin\amisww32.exe').lastwritetime=$(Get-Item $Env:tInstallDirProduct'\bin\caf.exe').creationtime"
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -Command "$(Get-Item $Env:tInstallDirProduct'\bin\amisww32.exe').creationtime=$(Get-Item $Env:tInstallDirProduct'\bin\caf.exe').creationtime"
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -Command "$(Get-Item $Env:tInstallDirProduct'\bin\amagentsvc.exe').lastwritetime=$(Get-Item $Env:tInstallDirProduct'\bin\caf.exe').creationtime"
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -Command "$(Get-Item $Env:tInstallDirProduct'\bin\amagentsvc.exe').creationtime=$(Get-Item $Env:tInstallDirProduct'\bin\caf.exe').creationtime"
    )

     




  4. Save the file.


The next time the deployment wizard is used to install the package on a new machine, the file sd_api.dll will have the correct date.

Remark : Apply the same solution for other Deployment Wizard packages used.

Additional Information

For

CA DSM Agent + Software Delivery plugin (English only Edition) 14.5.0.153 Windows_x86 ENU directory is Packages\Public\CAUnicenterDSM\AgentSD\12.0\ENU 
CA DSM Agent + Software Delivery plugin 14.5.0.153 Windows_x86 NLS(ENU,DEU,FRA,JPN)
directory is Packages\Public\CAUnicenterDSM\AgentSD\12.0\NLS(ENU,DEU,FRA,JPN)
CA DSM Agent + AM, RC, SD plugin(s) 14.5.0.153 Windows_x86 ENU
directory is Packages\Public\CAUnicenterDSM\AgentAM+RC+SD\12.0\ENU
CA DSM Agent + AM, RC, SD plugin(s) 14.5.0.153 Windows_x86 NLS(ENU,DEU,FRA,JPN)
directory is Packages\Public\CAUnicenterDSM\AgentAM+RC+SD\12.0\NLS(ENU,DEU,FRA,JPN)
CA DSM Scalability Server 14.5.0.153 Windows_x86 NLS(ENU,DEU,FRA,JPN)
directory is Packages\Public\CAUnicenterDSM\Server\12.0\NLS(ENU,DEU,FRA,JPN)