The HostsInstall script is configured to download, merge, sort, and remove duplicate entries from several different popular online "hosts" files. Here's a few features:
- It's Vista-aware! Admin users on Vista are given a "User Access Control" (UAC) prompt to insure the script runs with admin priveleges. Non-admin users on Vista, XP, and W2K are automatically presented a "RUNAS" prompt to allow them to log in as an administrator.
- Configuration is via simple tab-delimited plain-text files you can edit with Notepad
- You get the usual "whitelist" and "blacklist", but you can also specify things like your blackhole IP, lists of real hosts, and the list of web sites that provide hosts files.
- Merging and sorting happens extremely fast thanks to running everything through a database. No, a separate database program or complex setup is not required! The script handles everything.
- Your "DNS Client" service (which must not be running!) is checked every time the script is run. If the DNS Client service is running, the script will offer to stop and disable it for you.
- To make it easier for you to search your "hosts" file, the script sorts it by domain name. This means entries like "www.bad.com" and "bad.com" will be next to each other rather than at opposite ends of the hosts file.
- Rather than try to preserve comments from all the differing hosts providers, all comments are removed. New comments are added to the beginning of the generated hosts file to remind you of the location of the original script and the location of the configuration files.
- Finally, (and most importantly) this is an open-source script you're free to modify and redistribute!