I am trying to get the current operating system using this batch file. It is:
@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
My operating system is windows 7 so I expected it will return:
You are running Microsoft Windows 7 Ultimate.
But it returns you are running %c %d.
Why I am getting this result?