Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Vbscript DNS Server IP Changer

This is one of the oldest vbscript example in the internet, similar/same examples alot from different sites. I got it from here


Code
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colNetCards = objWMIService.ExecQuery _
    ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")

For Each objNetCard in colNetCards
    arrDNSServers = Array("8.8.8.8", "8.8.4.4")
    objNetCard.SetDNSServerSearchOrder(arrDNSServers)
Next


You change the dns server ip "("8.8.8.8", "8.8.4.4")", to your own isp dns/etc and save it to different script names eg. google.vbs, opendns.vbs etc.

I use it often, one for google and another one is my isp dns, so when one breakdown, I just double click the other dns script, and I can still surf the internet.🤣
Sorry but.. why are you posting it here if it's all over the internet and it's old... ?
Btw... i don't think vbs scripts are really related to VB.NET ...
Anyways, i guess.. Thanks for the share :P
I posted here in case someone needs it, my isp dns just breakdown again(as usual), I'm using google dns to access HF now.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by DramaKingNov 28, 2023 01:58 AM 3 366 Nov 28, 2023 01:58 AM
Last Post: jleeme
[Shell] by HackooJun 19, 2022 11:05 AM 0 216 Jun 19, 2022 11:05 AM
Last Post: Hackoo
[Shell] by I cry bloodOct 8, 2020 09:40 AM 7 440 Oct 8, 2020 09:40 AM
Last Post: Hackoo