The most popular DNS here is always intermittent, which is very unstable. In Guangzhou, if your DNS often needs to be replaced, try this batch processing.
Many people in the forum have posted batch processing to change DNS, but the batch processing waiting process is a bit slow. Some comrades have 2 to N bits local connections, which is very inconvenient when changing.
Batch content:
echo off
regedit /s \\\\server\\xx\\
cls
\\\\server\\xx\\ for your remote road force. Don't use mine, just modify the red part for your remote road force,
Below is the DNS registry key, mine is 2000,
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Services\\Tcpip\\Parameters\\Interfaces\\{B130BF2A-0BD5-4B4D-B3A9-55A94FC46694}]
"UseZeroBroadcast"=dword:00000000
"EnableDeadGWDetect"=dword:00000001
"EnableDHCP"=dword:00000000
"IPAddress"=hex(7):31,00,39,00,32,00,2e,00,31,00,36,00,38,00,2e,00,32,00,2e,00, 32,00,30,00,31,00,00,00,00,00
"SubnetMask"=hex(7):32,00,35,00,35,00,2e,00,32,00,35,00,35,00,2e,00,32,00,35, 00,35,00,2e,00,30,00,00,00,00,00
"DefaultGateway"=hex(7):31,00,39,00,32,00,2e,00,31,00,36,00,38,00,2e,00,32,00, 2e,00,32,00,35,00,34,00,00,00,00,00
"DefaultGatewayMetric"=hex(7):31,00,00,00,00,00
"NameServer"="202.96.128.166,61.144.56.100"
"Domain"=""
"DisableDynamicUpdate"=dword:00000000
"EnableAdapterDomainNameRegistration"=dword:00000000
"InterfaceMetric"=dword:00000001
"TCPAllowedPorts"=hex(7):30,00,00,00,00,00
"UDPAllowedPorts"=hex(7):30,00,00,00,00,00
"RawIPAllowedProtocols"=hex(7):30,00,00,00,00,00
"NTEContextList"=hex(7):30,00,78,00,30,00,30,00,30,00,30,00,30,00,30,00,30,00, 32,00,00,00,00,00
"DhcpClassIdBin"=hex:
"DhcpServer"="255.255.255.255"
"Lease"=dword:00000e10
"LeaseObtainedTime"=dword:45090a44
"T1"=dword:4509114c
"T2"=dword:45091692
"LeaseTerminatesTime"=dword:45091854
"IPAutoconfigurationAddress"="0.0.0.0"
"IPAutoconfigurationMask"="255.255.0.0"
"IPAutoconfigurationSeed"=dword:92437cc6
"AddressType"=dword:00000000
Save the REG and put it in your server's remote shared directory. Just modify the DNS in the red font above to your own DNS.
If someone doesn't know how to execute remotely, give a list
For example, my server name is sever, and the shared name created on the server is xx$$. It means hidden. You can add it or not.
I save the registry key above as, then I will put this registry in the shared directory of xx$.
That batch is written like this:
echo off
regedit /s \\\\server\\xx$\\
cls
Save the bat, throw this batch to the startup item, start the computer and run it, and it will be modified in 1 second, and it will take effect in time, without waiting slowly!