Created
January 18, 2021 00:16
-
-
Save benzBrake/048a46e5bb120f8ba4b362e0398e4214 to your computer and use it in GitHub Desktop.
设置计算机名
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set /p name=请输您的计算机名: | |
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v ComputerName /t reg_sz /d %name% /f | |
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v "NV Hostname" /t reg_sz /d %name% /f | |
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v Hostname /t reg_sz /d %name% /f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment