自动更改DNS的VBS脚本2007年01月27日 星期六 下午 02:06

Const STR_NEWDNS1 = "202.103.225.68" 
Const STR_NEWDNS2 = "202.103.229.40"
Set fs=CreateObject("Scripting.FileSystemObject")
strWinMgmt="winmgmts:{impersonationLevel=impersonate}"
Set objNICs = GetObject( strWinMgmt ).InstancesOf("Win32_NetworkAdapterConfiguration")
For Each objNIC In objNICs
If objNIC.IPEnabled Then
objNIC.SetDNSServerSearchOrder Array(STR_NEWDNS1,STR_NEWDNS2)

End If 
next

相关文章:

  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
  • 2022-12-23
  • 2021-11-12
  • 2021-11-10
  • 2022-12-23
猜你喜欢
  • 2021-07-07
  • 2021-08-08
  • 2021-08-17
  • 2022-02-01
  • 2021-12-03
  • 2021-07-15
  • 2021-06-16
相关资源
相似解决方案