用注冊表更改DNS,1秒切換完畢,快速又方便,不用麻煩的去等待了,支持遠程路勁運行
-
最進我這里DNS老是間歇性掉,很不穩(wěn)定,廣州地區(qū),如果你的DNS經(jīng)常需要更換,試試這個批處理,
論壇很多人發(fā)過了更改DNS的批處理,但改的過程批處理等待有點緩慢,還有的同志的本地連接有2到N位的,改時很不方便.
批處理內(nèi)容:
復制代碼 代碼如下:
echo off
regedit /s \\\\server\\xx\\xx.reg
cls
\\\\server\\xx\\xx.reg為你的遠程路勁.,不要用我的,只需修改紅色部分為你的遠程路勁,
下面是DNS的注冊表項,我的是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
保存REG然后放到你的服務器遠程共享目錄里,只需要修改上面紅色字體的DNS為你自己的DNS.
如有人不知道怎么遠程執(zhí)行,舉個列子,
比如我服務器名是sever,在服務器上建立的共享名是xx$ $表示隱藏,你可加也可以不加,
我把上面的注冊表項保存為a.reg,那我就把這個a.reg注冊表放到xx$的共享目錄里,
那批處理就這樣寫:
復制代碼 代碼如下:
echo off
regedit /s \\\\server\\xx$\\a.reg
cls
保存bat,把這個批處理丟到啟動項就可以了,開機運行,1秒就改完了,及時生效,無需緩慢的等待!
更多信息請查看IT技術專欄