A fellow Microsoft MVP has assembled a large list (> 6MB) of domain names/IP addresses mainly used to serve advertisements, tracking cookies, and sometimes even malware.
You can find the full instructions at http://www.mvps.org/winhelp2002/hosts.htm. I personally have been using this list for almost two years now (it is frequently updated).
Because I have IIS set-up on my main machine I decided to change the redirect IP address to 0.0.0.0 instead of 127.0.0.1, so that IIS is not “bothered” with the failed requests.
P.S. This list also blocks the YouTube commercials, which is a nice touch!
Previous readers of my blog might already know that I am a big fan of ImageX, a tool that has been supplied by Microsoft in the Windows Automated Installation Kit since the release of Windows Vista.
A quick introduction
ImageX is a command-line tool that enables original equipment manufacturers (OEMs) and corporations to capture, to modify, and to apply file-based disk images (.wim files) for rapid deployment.
WIM files can capture disk or directory snapshots in such a that identical files are only stored once in the internal structure of the image. In addition to this, compression can be used to minimize the size of the final data.
These are some of the reasons I have been using ImageX to take full “snapshots” of all of my code, private files, etc. from time to time, for backup and archiving purposes. When needed, I can extract different revisions of the same file, or restore a whole image/snapshot in case of disk damage or data loss.
The graph on the left visualizes the changes to my projects backup file spread across 16 months. The last image’s actual data weighs at 64GB, while the whole WIM is 59GB—and it contains all file changes, directory structures, even information that has long been deleted from my working copy.
- The scripts package. Download and extract to a folder of your choice.
- Download and install the Windows Automated Installation Kit (WAIK).
- Copy the ImageX binaries (both amd64 and x86 folders), located in \Program files\Windows AIK\Tools\ to the backup\app\imagex folder.
Capturing, mounting, or unmounting images requires administrative privileges, so you can either right-click the scripts and select Run as Administrator or create a shortcut to the script and change its Compatibility options to always require elevation.
The script defaults are below. These can change (in all four scripts, where used) as needed:
- C:\projects The folder to back up
- projects.wim (created and updated in the root backup folder) The Windows image to be used
- projects.YYMMDD-HHMM The image name template; it is dynamically updated based on the time when the capturing process is started
- mount (folder; located in the root folder) The mounted folder to use
Mounting Windows images is only possible after installing the driver by right-clicking wimmount.inf (in the respective ImageX folder), and selecting Install.
Using the solution
Testing and using the backup solution is quite easy. After preparing the ImageX binaries and editing the script defaults as needed:
- Simply run the capture.cmd script to take the initial snapshot of the target directory.
- To verify that the new image is processed, you can run the info.cmd script. The command-line output will show information about all images, including the new one.
- Repeat when a backup is needed.
Of course, the process can be fully automated, by just referencing the capture.cmd in the scheduling program of your choice.