dist: Make Windows installer uninstall first. Closes #9563

This will remove existing files before installing new ones. Note
that I took some code with no license from stackoverflow, as
indicated in comments.