请参阅下面的批处理文为什么我的批处理文件在输出到文本文件时会显示日文/中文字符?

时间:2017-07-05 15:07:26

标签: batch-file cmd command

请参阅下面的批处理文件。为什么我的批处理文件在输出到文本文件时会显示日文/中文字符?我正在自动化我的设置过程,因为我每周都会安装大量的PC。在命令提示符下执行以下命令时,它会返回正确的输出,但在我的批处理文件中,它会显示一堆中文字符。

systeminfo | findstr /B /C:"OS Name"
systeminfo | findstr c:/"installed Physical MEmory"

这是完整的批处理文件和输出。

set OLDNAME=%computername%
set /p var1="Enter the PC Name that will be used when joined to the domain: "

wmic computersystem where caption="%OLDNAME%" rename %var1% 

>output.txt (
wmic csproduct get name
wmic bios get serialnumber
systeminfo | findstr /B /C:"OS Name"
wmic cpu get name
systeminfo | findstr c:/"installed Physical MEmory"

)

输出如下:

MYPC                        
Surface with Windows 8 Pro  
SerialNumber  (Witheld for obvious reasons)
协丠浡㩥†††††††††䴠捩潲潳瑦圠湩潤獷ㄠ‰牐൯ഊ上愀洀攀                                      ഀ਀䤀渀琀攀氀⠀刀⤀ 䌀漀爀攀⠀吀䴀⤀ 椀㔀ⴀ㌀㌀㄀㜀唀 䌀倀唀 䀀 ㄀⸀㜀 䜀䠀稀  ഀ਀吀瑯污倠票楳慣敍潭祲›††ⰳ㠹‰䉍਍癁楡慬汢⁥桐獹捩污䴠浥牯㩹㈠㈬ㄳ䴠ൂ

思想?

0 个答案:

没有答案