@echo off set log=D:\%COMPUTERNAME%_%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%.log echo "当前用户名">>%log% whoami>>%log% echo "计算机名:">>%log% hostname>>%log% echo "软件一览">>%log% set templog=D:\temp.log wmic /OUTPUT:%templog% product get name,version,vendor type %templog% >> %log% del /Q %templog% echo "IP地址信息">>%log% ipconfig | findstr /I "IPv4" >> %log%