Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
MLGsuperGame414
- Posts: 54
- Joined: 10 Nov 2011 20:40
#1
Post
by MLGsuperGame414 » 05 Sep 2012 16:06
Alright well here is my problem.
My webserver was moved to another state so now my members cannot connect to it. I was wondering if making a batch script to change the properties of the local area connections to obtain a DNS server from google would be hard? If I did not explain fully here is a pic,

-
Dos_Probie
- Posts: 233
- Joined: 21 Nov 2010 08:07
- Location: At My Computer
#2
Post
by Dos_Probie » 05 Sep 2012 18:21
Here you go This works with W7 ...
Code: Select all
@echo Off
::Google.DNS.cmd
:: **CLEAR OUT EXSISTING DHCP ADDRESS AND DNS CACHE**
ipconfig/release
ipconfig/renew
ipconfig/flushdns
:: **SETS PERFERRED AND ALTERNATE GOOGLE DNS SERVER ADDRESS FOR LAN**
netsh int ip set dns "local area connection" static 8.8.8.8 primary
netsh int ip add dns "local area connection" 8.8.4.4
exit