In a batch file you need the double percent sign on your variables, and to properly quote the path to uuidgen.exe. The following works in a batch file on my local computer (note the different version of SDK)
for /f %%i in ('"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\uuidgen.exe"') do set guid=%%i
echo %guid%