find 当前离线
少将
TOP
@echo off echo 当前计算机名:%computername% set "input=%username%" set /p "input=请输入用户名:" for /f "tokens=2" %%a in ('findstr "%input%" 1.txt') do ( echo 将要更改的计算机名为:%%a pause wmic computersystem where "name='%computername%'" call rename %%a )复制代码