Zend certified PHP/Magento developer

Passing a variable to a variable within a batch file

I’m grabbing a value from the registry assigning it to %%b and trying to pass %%b to another area within the batch file as shown below. BUT it comes out as %b. It does not pass the variable a second time. Set SN=reg query “HKLMSOFTWAREXXXXXX SystemsXXXXXaway” /v “SerialNumber”
does not work obviously.

Here’s my code:

@echo off
FOR /F “tokens=2* skip=2” %%a in (‘reg query “HKLMSOFTWAREXXXXXX SystemsXXXXXaway” /v “SerialNumber”‘) do echo %%b

“c:program files (x86)carefusionRSS Component ManagerToolsatlas.DeviceRegistration.exe” environment=SQE serialnumber=%%b displayname=%computername% “devicetype=XXXXXX 2” “sapshipto=27703”

Thoughts?