Updating windows hosts file

I'll add another script (later) that will replace a string. If you are doing a search by hostname, just replace it in the script (eg: replace .105 with whatever your hostname is) This particular script is adding a new host to the list, if it doesn't exist.

I have some hosts that for some reason don't work with the DNS entries. Like several other people, I'm annoyed by the inability to choose when to update in Windows 10 Home, and this issue is one of the (several) reasons I hesitate to upgrade from 7.I don't have 10 yet so I can't try it for myself, but I thought that if I edited the hosts file and pointed update.(or whichever URL update uses) to an invalid IP, that would effectively block Windows from seeing if any updates are available until the line was commented out.This is useful when migrating your site to our servers and you haven't yet updated your nameservers.You can keep your domain's nameservers pointing to your previous host while you fully test your website on our servers, preventing any disruption of your site for your visitors while you test your site on your new server. Your hosts file is a just a text file that you can edit in notepad.

Leave a Reply