After batch file output to txt, fonts are not consistent?

I wrote a batch file to output my system infor to a txt file.
After I run it, I found that the fonts are not the same.
The output for "wmic" obviously are different than others (See picture).
There is also a big gap for CPU infor. I tried to delete the "echo." but no luck.
However, while I run "wmic" alone, its output is normal. but while I put some commands before "wmic", the fonts look wired.
anyone know why? thanks!

Here is my code:

@echo off
echo Checking your system infor, Please wating...
systeminfo | findstr /c:"Host Name"
systeminfo | findstr /c:"Domain"
systeminfo | findstr /c:"OS Name"
systeminfo | findstr /c:"OS Version"
systeminfo | findstr /c:"System Manufacturer"
systeminfo | findstr /c:"System Model"
systeminfo | findstr /c:"System type"
systeminfo | findstr /c:"Total Physical Memory"

ipconfig | findstr /c:"IP Address"


echo Hard Drive Space:
wmic diskdrive get size


echo Service Tag:
wmic bios get serialnumber

echo CPU:
wmic cpu get name

echo Completed! Thank you!


4 answers Last reply
More about after batch file output fonts consistent
  1. What OS are you using? I ran your script and it was just fine.
  2. problem solved, thanks!
  3. What was the problem?
  4. the script runs fine in command prompt. you will see the problem while output them to a txt file. but i fixed it. thanks!
Ask a new question

Read More

Programming Apps