To the environment set-up I need to pass the for %aa parameter to the variable. It seems simple set myvar=%%d is not enough. I tried to do some external call to the converter, but I'm not pretty sure how to set-up it. I finished with more a less following solution. But definetly it is not what I expect. I expect to properly echo myvar showing the proper values a, b, c, d one by one, but I could see the last one only.
for %%a in (a,b,c,d) do (
call :extractvar myvar %%a
echo %myvar%
)
:extractvar <resvar> <invar> (
set "%1"
exit /b
)