I have a script that works perfectly.
if not exist %SystemRoot%\system32\systeminfo.exe goto warnthenexit
systeminfo | find "OS Name" > osname.txt
FOR /F "usebackq delims=: tokens=2" %%i IN (osname.txt) DO set vers=%%i
echo %vers% | find "Windows 7" > nul
if %ERRORLEVEL% == 0 goto VERSION_7
However, when I try to print the results like so:
Echo Current OS:%vers% - 64 Bit
It prints the results with a really! long gap. Like so:
Current OS: Microsoft Windows 7 Enterprise - 64 Bit
Does anyone know why? or how I can remove the large gap?
Thanks a million!