bat 更改计算机名
不用重启电脑就生效
mportant;">
@Echo off Color 0A title ……更改计算机名 :A cls echo. echo. [0]退出 echo. echo. 不用重启电脑就生效^_^ echo. echo. 必须以管理员身份运行 ! echo. echo. set /p pc= [输入计算机名] # If "%pc%"=="" goto A If "%pc%"=="0" exit set computername=%pc% :: PC name reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v ComputerName /t reg_sz /d "%computername%" /f reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName" /v ComputerName /t reg_sz /d "%computername%" /f reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v "NV Hostname" /t reg_sz /d "%computername%" /f reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v Hostname /t reg_sz /d "%computername%" /f set/p= <nulfor /L %%i in (1,1,38) do set /p a= <nul&ping /n 1 127.0.0.1>nul echo 100%% :end exit
本文链接:https://www.kinber.cn/post/2914.html 转载需授权!
推荐本站淘宝优惠价购买喜欢的宝贝: