Your problem is that SYSTEMINFO produces ANSII output (like most commands), but WMIC produces Unicode output. The two do not mix well.
Below are three solutions that produce ANSII output.
1) Output WMIC to MORE
MORE converts Unicode to ANSII. I also pass this FINDSTR result to eliminate blank lines. The only problem with this solution is that the quirk with conversions causes the WMIC output to have an extra carriage return at the end of each line ( <CR><CR><LF> instead of <CR><LF> )
@echo OFF >test1.txt ( echo Manufacturer Information: systeminfo|findstr /c:"Host Name" /c:"OS Name" /c:"System Model:" /c:"System Type:" /c:"Total Physical Memory:" echo( echo CPU Information: wmic cpu get Name /Format:list | more | findstr . wmic computersystem get NumberofProcessors /Format:list | more | findstr . echo( echo NIC Information: wmic nicconfig where IPEnabled=TRUE get ipaddress, macaddress,defaultipgateway /format:list | more | findstr . )
------------------------------
Other solutions are fully formatted without additional <CR>
2) Write WMIC output to temp file and then TYPE
The temporary file is in Unicode format, and TYPE correctly converts Unicode to ANSII. I am still passing FINDSTR result to eliminate blank lines.
@echo OFF >test2.txt ( echo Manufacturer Information: systeminfo|findstr /c:"Host Name" /c:"OS Name" /c:"System Model:" /c:"System Type:" /c:"Total Physical Memory:" echo( echo CPU Information: call :wmic cpu get Name /Format:list call :wmic computersystem get NumberofProcessors /Format:list echo( echo NIC Information: call :wmic nicconfig where IPEnabled=TRUE get ipaddress, macaddress,defaultipgateway /format:list ) exit /b :wmic wmic %* >test.tmp type test.tmp | findstr . del test.tmp exit /b
3) Run WMIC through two FOR / F loops.
The first FOR / F converts the output of WMIC to ANSII, but has the value <CR> at the end of each line. The second FOR / F removes the unwanted trailing <CR> . FOR / F automatically deletes empty lines.
@echo OFF >test3.txt ( echo Manufacturer Information: systeminfo|findstr /c:"Host Name" /c:"OS Name" /c:"System Model:" /c:"System Type:" /c:"Total Physical Memory:" echo( echo CPU Information: call :wmic cpu get Name /Format:list call :wmic computersystem get NumberofProcessors /Format:list echo( echo NIC Information: call :wmic nicconfig where IPEnabled=TRUE get ipaddress, macaddress,defaultipgateway /format:list ) exit /b :wmic for /f "delims=" %%A in ('"wmic %*"') do for /f "delims=" %%B in ("%%A") do echo %%B exit /b