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