我正在尝试使用此批处理文件获取当前的操作系统。是:
@echo off
for /f "skip=1 tokens=1* delims= " %%a in ('wmic path win32_operatingsystem get caption') do set _os=%%a %%b %%c %%d
echo You are running %_os%.
goto :eof
我的操作系统是Windows 7,因此我希望它会返回:
You are running microsoft Windows 7 Ultimate.
但是它返回您正在运行%c%d。
Why I am getting this result?