DOS windows 使用bat脚本获取 IP MAC 系统信息


@echo select disk 0 >dpjs.txt

@echo detail disk >>dpjs.txt

diskpart /s dpjs.txt
@echo ------------------fidisk---------------- >>info.txt
diskpart /s dpjs.txt|findstr "ID:" >info.txt
::diskpart /s dpjs.txt>info.txt
@echo ------------------------------------------------ >>info.txt

::ipconfig /all >>info.txt
@echo ----------------------IP MAC---------------- >>info.txt
::ipconfig /all |findstr "IPv4" >>info.txt
::ipconfig /all |findstr /i "物理地址" >>info.txt
ipconfig /all >>info.txt

@echo ---------------------init-date--------------- >>info.txt
systeminfo >> info.txt
::systeminfo | findstr /i "初始安装日期:" >> info.txt
del /q dpjs.txt

 

 

没能找到 如何过滤中文,并且输出有大佬麻烦指导下谢谢了

posted @ 2019-04-24 09:59  SmallNine  阅读(1861)  评论(0编辑  收藏  举报