Hi, as a test, can you try with a VBS file instead of batch file?
I tested with V6.31 and all works fine:
Batch file:
rem test
echo "Hello World"
set arg1=%1
set arg2=%2
echo "Lets do a multiplication"
set /A myerrorlevel = %arg2% * %arg1%
echo %myerrorlevel%
rem pause
EXIT /B %myerrorlevel%
Macro:
{
"Name": "batch",
"CreationDate": "2021-12-21",
"Commands": [
{
"Command": "echo",
"Target": "start",
"Value": "blue",
"Description": ""
},
{
"Command": "XRunAndWait",
"Target": "C:\\tst1\\v1.vbs",
"Value": "8",
"Description": "Works!"
},
{
"Command": "comment",
"Target": "XRunAndWait // C:\\tst1\\test.bat",
"Value": "8 881",
"Description": ""
},
{
"Command": "echo",
"Target": "Done, exit code is ${!xrun_exitcode}",
"Value": "green",
"Description": ""
}
]
}