Windows modifies computer name and ip
@ echo offecho.echo.echo automatically modifies the computer name and ipecho.set / p f = Please enter the computer's IP suffix (value less than 255th): set name= test%f%set net= local connection 3set ip=192.168.10.set mask=255.255.255.0set gateway=192.168.10.1set dns1=114.114.114.114set dns2=8.8.8.8reg add "HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ ShellNoRoam" / v @ / t REG_SZ / d "% name%" / f > nul reg add "HKLM\ SYSTEM\ CurrentControlSet\ Control\ ComputerName\ ComputerName" / v "ComputerName" / t REG_SZ / d "% name%" / f > nul reg add "HKLM\ SYSTEM\ CurrentControlSet\ Control\ ComputerName\ ActiveComputerName" / v "ComputerName" / t REG_SZ / d "% name%" / f > nul reg add "HKLM\ SYSTEM\ CurrentControlSet\ Services\ Eventlog" / v "ComputerName" / t REG_SZ / d "name%" / f > nul reg add "HKLM\ SYSTEM\ CurrentControlSet\ Control\ ComputerName\ ComputerName "/ v" ComputerName "/ t REG_SZ / d"% name% "/ f > nul reg add" HKLM\ SYSTEM\ CurrentControlSet\ Services\ Tcpip\ Parameters "/ v" NV Hostname "/ t REG_SZ / d"% name% "/ f > nul reg add" HKLM\ SYSTEM\ CurrentControlSet\ Services\ Tcpip\ Parameters "/ v" Hostname "/ t REG_SZ / d"% name% "/ f > nulnetsh interface ip set address"% net% static " % ip%%f%% mask%% gateway%netsh interface ip set dns "% net%" static% dns1% primarynetsh interface ip add dns "% net%"% dns2%echo modified configuration information is as follows: echo.echo computer name% name%echo ip% ip%%f%echo mask% mask%echo gateway% gateway%echo dns1% dns1%echo dns2 Dns2%echo.echo computer name and ip modified successfully pause