Sign in with
Sign up | Sign in
Your question

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

Last response: in Applications
December 30, 2010 2:28:05 AM

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!


a b L Programming
December 31, 2010 11:38:00 AM

What OS are you using? I ran your script and it was just fine.
December 31, 2010 6:04:59 PM

problem solved, thanks!
Related resources
a b L Programming
December 31, 2010 6:25:27 PM

What was the problem?
January 1, 2011 5:21:45 AM

the script runs fine in command prompt. you will see the problem while output them to a txt file. but i fixed it. thanks!