@echo off
for /f "tokens=1-2 delims=:" %%a in ('ipconfig^|find "IPv4"') do set ip=%%b
set ip=%ip:~1%
for /F "tokens=2 delims==" %%s in ('wmic bios get serialnumber /value') do set sn=%%s
echo IP address : %ip%
echo Computer Serical Number : %sn%
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v Hostname /t REG_SZ /d %sn% /f
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v "NV Hostname" /t REG_SZ /d %sn% /f
REG ADD HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName /v ComputerName /t REG_SZ /d %sn% /f
echo 컴퓨터 이름이 %sn%로 변경되었습니다!!!
echo.
pause
sysdm.cpl
exit