A scripted Windows Report is no longer functioning within CA Automic Workload Automation

Document ID : KB000115557
Last Modified Date : 21/09/2018
Show Technical Document Details
Issue:
There is the possibility to use the Scripted Report function for Windows Agents.
The following script example

:set &apath = get_var(UC_EX_PATH_TEMP)
:set &spoollst = get_att(FILENAME_SYSOUT)
:print &spoollst
:print &apath dir > &apath&spoollst

is no longer working with Automic Windows Agent 12.1 or 12.2.

The output in the Report looks then the following way:

 
c:\>D:\ABC\ABC\ABC\Agents\WIN01\bin\UCXJWX6M.EXE JNR=0001507008 MNR=0001 PNR=2370 IPA=xx.xxx.xx.xx TYP=S TXT=" Job started" Program 'UC4 Job Messenger' version '12.2.0+build.1034' started
UCMDJP: *********************************************************************
UCMDJP: ** JOB 0001507008 (ProcID:0000008736) START AT 16.07.2018/15:21:35 **
UCMDJP: ** UTC TIME 16.07.2018/13:21:35 **
UCMDJP: ** --------------------------------------------------------------- **
UCMDJP: ** USED: 0.000 CPU **
UCMDJP: *********************************************************************
Program 'UC4 Job Messenger' version '12.2.0+build.1034' terminated normally
c:\>D:\ABC\ABC\ABC\Agents\WIN01\temp\OAADHTHW.TXT
D:\ABC\ABC\ABC\Agents\WIN01\temp\OAADHTHW.TXT

c:\>echo dir 1>D:\ABC\ABC\ABC\Agents\WIN01\temp\OAADHTHW.TXT
The process cannot access the file because it is being used by another process.

c:\>D:\ABC\ABC\ABC\Agents\WIN01\bin\UCXJWX6M.EXE JNR=0001507008 MNR=0001 PNR=2370 IPA=xx.xxx.xx.xx TYP=E RET=00000000 TXT=" Job ended"
Program 'UC4 Job Messenger' version '12.2.0+build.1034' started
UCMDJP: *********************************************************************
UCMDJP: ** JOB 0001507008 (ProcID:0000008736) ENDED AT 16.07.2018/15:21:35 **
UCMDJP: ** UTC TIME 16.07.2018/13:21:35 **
UCMDJP: ** --------------------------------------------------------------- **
UCMDJP: ** USED: 0.000 CPU **
UCMDJP: *********************************************************************
Program 'UC4 Job Messenger' version '12.2.0+build.1034' terminated normally
c:\>GOTO JOBENDE

 

With older Windows Agent version this worked correctly and the Report had the information about the drive included.

Environment:
N/A
Cause:
A problem has been fixed where that caused the scripted Windows report to throw the following error message: "The process cannot access the file because it is being used by another process."
Resolution:
Workaround:
Use the Windows Agent in v12.0.5

Solution:
Upgrade to the fix version below or a higher one.

Component(s):
Agent Windows

Fix Version(s):
Automation.Engine 12.1.3 - estimated, planned Release date: End of September 
Automation.Engine 12.2.1 - estimated, planned Release date: End of October