@echo off
echo 必需更改网上邻居属性中的网络连接为 "本地连接"
pause
cls
set/p ip=请输入IP地址:
netsh interface ip set address name="本地连接" source=static addr=%ip% mask=255.255.255.0
set /p name=请输您的计算机名:
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v ComputerName /t reg_sz /d student%name% /f
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v "NV Hostname" /t reg_sz /d student%name% /f
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v Hostname /t reg_sz /d student%name% /f
reg add "HKEY_LOCAL_MACHINE\System\ControlSet001\Control\ComputerName\ActiveComputerName" /v ComputerName /t reg_sz /d student%name% /f
reg add "HKEY_LOCAL_MACHINE\System\ControlSet001\Control\ComputerName\ComputerName" /v ComputerName /t reg_sz /d student%name% /f
reg add "HKEY_LOCAL_MACHINE\System\ControlSet002\Control\ComputerName\ComputerName" /v ComputerName /t reg_sz /d student%name% /f
reg add "HKEY_LOCAL_MACHINE\System\ControlSet002\Services\Eventlog" /v ComputerName /t reg_sz /d student%name% /f
pause