컴퓨터 이름 변경하는 배치파일

@echo off

prompt $p$g

setlocal



:message

set /p comname=## Computer Name ## =    

set /p username=## UserAccount ## =   



if /i [%comname%]==[] goto error

if /i [%username%]==[] goto error



wmic computersystem where caption="%computername%" call rename name=%comname%

wmic UserAccount where Name="helper" call Rename Name=%username%



pause > nul 

goto end 



:error

echo error

pause > nul

goto end 



:end

exit
shutdown.exe /s /t 0

 

 

computerNAME.bat
0.00MB

이 글을 공유하기

댓글

Designed by JB FACTORY