Try this,
echo Off
setlocal ENABLEEXTENSIONS
set KEY_NAME="HKLM\SYSTEM\CurrentControlSet\services\MA Service"
set VALUE_NAME=DBServer
echo %VALUE_NAME%
echo %KEY_NAME%
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY %KEY_NAME% /v %VALUE_NAME%') DO SET TMP=%%B
ECHO TMP=%TMP%
endlocal
pause