How use $#ec: parameters in deploywrapper procedure ?
search cancel

How use $#ec: parameters in deploywrapper procedure ?

book

Article ID: 237237

calendar_today

Updated On:

Products

CA Client Automation - IT Client Manager CA Client Automation - Software Delivery CA Client Automation

Issue/Introduction

Some SD Packages have a procedure with deploywrapper.exe
 
Example :
Package for Patch 99111347 (14.5 CU2)
CA DSM Agent + Explorer +  Scalability Server 14.5 CU2 (Win32 only) 14.5.0.284
has a PatchInstall procedure : 
/INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLNEW  /OUTPUTFILE=$rf
 
 
 
 
On some computers execution of this procedure returns exit code 10. Installation is successful but a reboot is needed, to complete the installation. And the SD Job is in Error Status
 
Macro $#ec:10 could be added in procedure parameters to consider exit code 10 as a successful status
/INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLNEW  /OUTPUTFILE=$rf $#ec:10 $#ec:0
 
But with these parameters, installation does not work and deploywrapper.exe is looping.
 
How to add $#ec parameters in deploywrapper procedure ?

Environment

Client Automation - Any Versions

Resolution

Put the $#ec: parameters at the beginning of parameter list :
 
 $#ec:10 $#ec:0 /INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLNEW  /OUTPUTFILE=$rf
 
 
 
Remark :
If a computer has received the procedure with $#ec parameters at the end and had the deploywrapper.exe looping problem, delete the section [DeployWrapper] from file c:\windows\win.ini

Additional Information

First execution deploywrapper.exe adds following section in c:\windows\win.ini
 
[DeployWrapper]
SDState=1
SDCmdLine=DeployWrapper.exe /INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLNEW /INSTALLAGAIN /OUTPUTFILE=C:\PROGRA~2\CA\DSM\Agent\units\00000001\usd\sdjexec\B35AA17E-475C-4276-AF9F-106220F889B1.res  
SDNewCmd=DeployWrapper.exe /INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLNEW /INSTALLAGAIN /OUTPUTFILE=C:\PROGRA~2\CA\DSM\Agent\units\00000001\usd\sdjexec\B35AA17E-475C-4276-AF9F-106220F889B1.res  

There are 2 space characters at the end of sdcmdline and sdnewcmd ($#ec:10 $#ec:0 have been replaced by 2 space characters)

When second deploywrapper.exe is executed, it reads the lines in win.ini file and it seems that space characters at the end are automatically removed during reading.

When it compares the command line and the command line read, it detects a change and reset the SD State and do again the process from beginning.

 

In c:\windows\temp\TRC_DeployWrapper_ITRM.log there are this line :
The current command line have 2 spaces at the end
3800: 2022-02-23 09:24:34 : cmd: <DeployWrapper.exe /INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLAGAIN /OUTPUTFILE=C:\PROGRA~2\CA\DSM\Agent\units\00000001\usd\sdjexec\B35AA17E-475C-4276-AF9F-106220F889B1.res  >

 

But the command line read from file c:\windows\win.ini is not exactly the same :

3800: 2022-02-23 09:24:34 :  SDCmdLine=<DeployWrapper.exe /INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLAGAIN /SILENT  /OUTPUTFILE=C:\PROGRA~2\CA\DSM\Agent\units\00000001\usd\sdjexec\B35AA17E-475C-4276-AF9F-106220F889B1.res>
cmdLineCopy=<DeployWrapper.exe /INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLAGAIN /OUTPUTFILE=C:\PROGRA~2\CA\DSM\Agent\units\00000001\usd\sdjexec\B35AA17E-475C-4276-AF9F-106220F889B1.res  >

3800: 2022-02-23 09:24:34 :  SDNewCmd=<DeployWrapper.exe /INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /CONFIRMBYPASS /OUTPUTFILE=C:\PROGRA~2\CA\DSM\Agent\units\00000001\usd\sdjexec\B35AA17E-475C-4276-AF9F-106220F889B1.res> 
3800: 2022-02-23 09:24:34 : SDState reset to 0 - old SDCmdLine DeployWrapper.exe /INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLAGAIN /OUTPUTFILE=C:\PROGRA~2\CA\DSM\Agent\units\00000001\usd\sdjexec\B35AA17E-475C-4276-AF9F-106220F889B1.res
As it detects a change in the command line, it resets the SDState to 0 and try again.
 
With this parameter :
$#ec:10 $#ec:0 /INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLAGAIN /OUTPUTFILE=$rf
 
The command line seen in c:\windows\temp\TRC_DeployWrapper_ITRM.log is
 
4084: 2022-02-23 10:07:28 :  SDCmdLine=<DeployWrapper.exe   /INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLAGAIN /OUTPUTFILE=C:\PROGRA~2\CA\DSM\Agent\units\00000001\usd\sdjexec\141DE47B-F6E8-4239-B7D0-2BC98496E398.res>
cmdLineCopy=<DeployWrapper.exe   /INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLAGAIN /OUTPUTFILE=C:\PROGRA~2\CA\DSM\Agent\units\00000001\usd\sdjexec\141DE47B-F6E8-4239-B7D0-2BC98496E398.res>

The 2 spaces are put between DeployWrapper.exe and /INST
 
It is the same in c:\windows\win.ini
[DeployWrapper]
SDState=1
SDCmdLine=DeployWrapper.exe   /INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLAGAIN /OUTPUTFILE=C:\PROGRA~2\CA\DSM\Agent\units\00000001\usd\sdjexec\141DE47B-F6E8-4239-B7D0-2BC98496E398.res
SDNewCmd=DeployWrapper.exe   /INST ApplyPtfInstall /PTF=99111347.jcl /SILENT /INSTALLAGAIN /OUTPUTFILE=C:\PROGRA~2\CA\DSM\Agent\units\00000001\usd\sdjexec\141DE47B-F6E8-4239-B7D0-2BC98496E398.res
 
So when the comparaison is made there is no diffference and installation is working.