Windows - fix "HTTP server doesn't seem to support byte ranges" Vagrant error

Vagrant is very popular in the Linux community, but it also runs on Windows (where it comes with its own set of problems I guess).

I was trying to set up some machine, but the boxes needed to be downloaded first. Unfortunately my machine went into sleep mode before the download finished.
Calling vagrant up resulted in the following error:

An error occurred while downloading the remote file. The error message, if any, is reproduced below. Please fix this error and try again.

HTTP server doesn't seem to support byte ranges. Cannot resume.

Thanks to this blog post that describes how to fix this on Linux I was able to figure out how to solve it on Windows.
You just have to run this command to remove the temp directory.

rmdir %vagrant_home%\tmp /S

As you can see %VAGRANT_HOME% points to the directory when Vagrant stores its files.

If you want to change the Vagrant home directory after installing Vagrant, fex. to another (larger) drive, you can run this command:

setx VAGRANT_HOME=Z:\VirtualMachines\VagrantHome /m

New to Vagrant? Here’s the Vagrant dowload page (although you should use Chocolatey) and the Getting Started documentation.