Fantastic hack created by jeb!
But including their solution break some needed functionality:
@echo off& setlocal
<:GetCaller <nul call GetCaller.bat myCallerVar
echo I'm : "%~f0"
echo My arguments : %*
echo My caller : "%myCallerVar%"
endlocal& set "%~1=[%myCallerVar%]"& exit /b 0
In the last line, the set command just store and return a empty data and no longer works as intended.
Thanks!