Whilst developing and supporting our Wi-Fi and networking products, we often found that the network settings in Windows Vista/7 got stuck when you switched from one network to another or turned off the internal wireless adaptor and plugged in an external long range wireless adaptor. This seems to be a “feature” of Windows Vista/7 as we did not find the same problems on Macs, iPhones, iPads, LINUX and Android systems.
On Windows XP, there use to be a “Repair Network” option but on Windows Vista/7 this was removed and often the only way to reset everything is to reboot the PC. Depending upon what you are doing and what you have open, this can be a major pain, so we created a little batch file that basically does what the “Repair Network” feature did in Windows XP.
If you keep a copy of this batch file on your PC, when you make any changes to the network adaptors or switch networks you can run this batch file to reset all of your network adaptors and avoid rebooting the PC. To run the batch file, right click on the icon and select the “Run as Administrator” option (as shown in the image above).
Click here to download the batch file.
@Echo on
pushdwindowssystem32driversetc
attrib -h -s -r hosts
echo 127.0.0.1 localhost>HOSTS
attrib +r +h +s hosts
popd
ipconfig /release
ipconfig /renew
ipconfig /flushdns
netsh winsock reset all
netsh int ip reset all
only this !
patricevenekas@gmail.com
Hi Patrice,
Yes this Windows Batch file runs the commands that you have listed and these commands reset the network adaptors, flush the ARP and DNS cache and a few other things that are equivalent to rebooting the PC without the delay or inconvenience. It is similar to the “Repair” connection option that was available in Windows XP but removed in Vista and 7.
I’m not that much of a online reader to be honest but your blogs really nice, keep
it up! I’ll go ahead and bookmark your site to come
back down the road. Many thanks