Batch file with output of computer info. WMIC adding spaces

Viewed 14

I created a batch file that spits out several specs and information from computers and saves a text file with all the info, but some of the WMIC commands are outputting with spaces on it. I've spent a few hours trying to figure it out but no luck.

If anybody can lend me a hand id greatly appreciate it. Thank you!

This is my batch file

@echo off
>output.txt (
echo Checking your system info, Please wait...

wmic bios get serialnumber
systeminfo
wmic cpu get name
wmic product get name, version
wmic diskdrive get Name, Manufacturer, Model, InterfaceType, MediaType,SerialNumber, Size
ipconfig /all

)

@pause

And this is a tiny example of the output (i didnt want to paste the whole output). I've read all around about it being Unicode but cant figure out how to achieve my end goal.

N a m e                                                                                         
 
 1 1 t h   G e n   I n t e l ( R )   C o r e ( T M )   i 7 - 1 1 6 5 G 7   @   2 . 8 0 G H z
0 Answers
Related