var中存储的数据,PROCESSOR_ARCHITECTURE存储的内容
@echo off for /f "tokens=1* delims=[" %%a in ('ver') do set b=%%b set b=%b:* =% goto %b:~0,4%%PROCESSOR_ARCHITECTURE:~-1% :5.1.6 echo xp_32位 goto:eof :6.1.6 echo win7_32位 goto:eof :6.1.4 echo win7_64位 :6.0.6 echo vista_32 exit :6.0.4 echo vista_64 exit