SyntaxFix
Write A Post
Hire A Developer
Questions
The only way I've seen it done is if you do this:
for /f "delims=" %a in ('ver') do @set foobar=%a
ver is the version command for Windows and on my system it produces:
ver
Microsoft Windows [Version 6.0.6001]
Source