Save result of program to variable in Batch

Construct_Sequential

set cmd=application
set arg1=0101
for /f %%i in ('%cmd% %arg1%') do set result=%%i
echo =%result%

Thanx to http://stackoverflow.com/a/2340018