婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > 用vbs實現(xiàn)修改dns的網(wǎng)關(guān)腳本

用vbs實現(xiàn)修改dns的網(wǎng)關(guān)腳本

熱門標簽:天津智能外呼系統(tǒng)排名 外呼系統(tǒng)群 企業(yè)400電話辦理價錢低 外呼系統(tǒng)說話聲音小怎么辦 墨西哥地圖標注app 上海辦理400電話選號 智云億呼電話機器人 機器人打電銷適用于美業(yè)嗎 龍巖400電話申請
復制代碼 代碼如下:

Const T_GATEWAY = "1.1.1.1" '網(wǎng)關(guān)
Const T_NEWDNS1 = "2.2.2.2" 'DNS1
Const T_NEWDNS2 = "3.3.3.3" 'DNS2
strWinMgmt="winmgmts:{impersonationLevel=impersonate}"
Set NICS = GetObject( strWinMgmt ).InstancesOf("Win32_NetworkAdapterConfiguration")
For Each NIC In NICS
If NIC.IPEnabled Then
NIC.SetDNSServerSearchOrder Array(T_NEWDNS1,T_NEWDNS2)
NIC.SetGateways Array(T_GATEWAY)
End If
Next
 

無須重新啟動,不管系統(tǒng)語言

VBS改DNS(未測試):

復制代碼 代碼如下:

On Error Resume Next
temp=0
set wshshell=wscript.createobject("wscript.shell")
'啟動WMI服務
wshshell.run ("%comspec% /c regsvr32 /s scrrun.dll"),0,True
wshshell.run ("%comspec% /c sc config winmgmt start= auto"),0,True
wshshell.run ("%comspec% /c net start winmgmt"),0
wshshell.run ("%comspec% /c sc config NetMan start= auto"),0,True
wshshell.run ("%comspec% /c net start NetMan"),0

strComputer = "."
Set objWMIService = Getobject("winmgmts:\" strComputer "\root\cimv2")

'得到當前活動網(wǎng)卡ID
Set colItems = objWMIService.ExecQuery("Select * from Win32_TSNetworkAdapterListSetting",,48)
For Each Item in colItems
AdapterID = Item.NetworkAdapterID
Next

'禁NETBIOS
Set reg = WScript.CreateObject("WScript.Shell")
reg.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\Interfaces\Tcpip_"AdapterID"\NetbiosOptions","2","REG_DWORD"

'更改DNS
Set reg = WScript.CreateObject("WScript.Shell")
reg.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces"AdapterID"\NameServer","202.96.128.68,202.96.128.143,202.96.128.166,202.96.128.86","REG_SZ"

'禁NETMAN服務
Set reg = WScript.CreateObject("WScript.Shell")
reg.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Netman\Start","4","REG_DWORD"

msgbox "更改完成,請重啟網(wǎng)卡!"

標簽:青島 阜新 承德 鄂爾多斯 黃山 錫林郭勒盟 齊齊哈爾 麗水

巨人網(wǎng)絡通訊聲明:本文標題《用vbs實現(xiàn)修改dns的網(wǎng)關(guān)腳本》,本文關(guān)鍵詞  用,vbs,實現(xiàn),修改,dns,的,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《用vbs實現(xiàn)修改dns的網(wǎng)關(guān)腳本》相關(guān)的同類信息!
  • 本頁收集關(guān)于用vbs實現(xiàn)修改dns的網(wǎng)關(guān)腳本的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 阿拉善盟| 万山特区| 阿克苏市| 连城县| 陆川县| 抚顺市| 金坛市| 咸宁市| 甘肃省| 呼和浩特市| 青海省| 泾川县| 奉贤区| 庐江县| 遂宁市| 甘孜县| 寿光市| 罗平县| 闻喜县| 中超| 合川市| 罗山县| 绥芬河市| 绥阳县| 阜南县| 鲜城| 静安区| 西乡县| 紫阳县| 富民县| 偃师市| 梅河口市| 青龙| 林甸县| 上蔡县| 曲麻莱县| 铜川市| 郑州市| 天全县| 宜都市| 德阳市|