Change DNS Server through registry?

5,394

Rather than using a .reg file you can use the NETSH command line util, e.g.

netsh interface ip set dns "Local Area Connection" static 192.168.0.200

taken from and more info available here

You can then create .bat files with the 2 different settings you want

Share:
5,394

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin almost 2 years

    How can I change/switch my DNS server IP address by a registry script?

    For example, I want to change to Google DNS Server (IP: 8.8.8.8) often and when I need to check my internet usage I need to switch back to the default service provider's DNS Server.

    So I need to create two reg scripts one for setting the DNS to nil (Default) and the other for changing it to google DNS.

    Any idea?