Sign in with
Sign up | Sign in
Your question

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

Last response: in Applications
Share
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.

echo Hard Drive Space:
wmic diskdrive get size

echo.
echo.

echo Service Tag:
wmic bios get serialnumber

echo.
echo.
echo CPU:
wmic cpu get name

echo Completed! Thank you!

pause

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.
m
0
l
December 31, 2010 6:04:59 PM

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

What was the problem?
m
0
l
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!
m
0
l
!