diff --git a/misc/dist/windows/README b/misc/dist/windows/README
index 898940edf5b..a0b0a8a7c13 100644
--- a/misc/dist/windows/README
+++ b/misc/dist/windows/README
@@ -4,7 +4,7 @@ and installer (msi) format.
Dependencies
============
- Windows Installer XML (WiX) toolset: http://wix.sourceforge.net/
-- 7Zip (command-line version): http://www.7-zip.org/download.html
+- 7Zip (command line version): http://www.7-zip.org/download.html
- Mercurial (hg): http://mercurial.selenic.com/
@@ -13,9 +13,9 @@ Packaging
The dependencies must be callable from dist.bat, therefore,
they'll need to be in/added to the system's search PATH.
-Ensure the working directory reflects the toolset version;
-the packager clones the Go directory it resides in and copies the
-pre-built toolchain over into the cloned folder.
+The packaging needs to be done from within a tracked Go folder.
+Packages are built by cloning the same version of the source tree
+that the Go tools were built from.
To create an i386 distribution package on a 64 bit system, set
GOARCH=386 prior to calling dist.bat.
@@ -26,4 +26,11 @@ TODO
----
- Documentation server shortcut checkbox option
+Misc
+----
+WiX box sizes:
+ - banner size: 493x58
+ - left side of dialog: 164x312
+ - full dialog size: 493x312
+
diff --git a/misc/dist/windows/dist.bat b/misc/dist/windows/dist.bat
index 0903577ef13..4ae2df58aad 100644
--- a/misc/dist/windows/dist.bat
+++ b/misc/dist/windows/dist.bat
@@ -7,10 +7,14 @@ setlocal
:: Requires Windows Installer XML (WiX), 7zip, and Mercurial (hg)
+echo # Cleaning previous WiX output files
+del /F /Q /S *.wixobj AppFiles.wxs *.wixpdb>NUL
+
echo # Setting some variables
for /f %%i in ('hg.exe root') do set ROOT=%%i
-for /f %%i in ('hg.exe id -n') do set ID=%%i
for /f "tokens=3" %%i in ('%ROOT%\bin\go.exe version') do set VER=%%i
+for /f "tokens=4" %%i in ('%ROOT%\bin\go.exe version') do set ID=%%i
+set ID=%ID:+=%
if errorlevel 1 goto end
echo # Getting GOARCH
@@ -35,7 +39,7 @@ xcopy %ROOT%\pkg go\pkg /V /E /Y /I
xcopy %ROOT%\bin go\bin /V /E /Y /I
xcopy %ROOT%\src\pkg\runtime\z*.c go\src\pkg\runtime /V /E /Y
xcopy %ROOT%\src\pkg\runtime\z*.go go\src\pkg\runtime /V /E /Y
-xcopy %ROOT%\src\pkg\runtime\z*.h go\src\pkg\runtime /V /E /T
+xcopy %ROOT%\src\pkg\runtime\z*.h go\src\pkg\runtime /V /E /Y
echo # Starting zip packaging
7za a -tzip -mx=9 go.%VER%.windows-%GOARCH%.zip "go/"
diff --git a/misc/dist/windows/images/Banner.jpg b/misc/dist/windows/images/Banner.jpg
new file mode 100644
index 00000000000..636479614cb
Binary files /dev/null and b/misc/dist/windows/images/Banner.jpg differ
diff --git a/misc/dist/windows/images/Dialog.jpg b/misc/dist/windows/images/Dialog.jpg
new file mode 100644
index 00000000000..1f0ec0a313b
Binary files /dev/null and b/misc/dist/windows/images/Dialog.jpg differ
diff --git a/misc/dist/windows/images/DialogLeft.jpg b/misc/dist/windows/images/DialogLeft.jpg
new file mode 100644
index 00000000000..73bab89b436
Binary files /dev/null and b/misc/dist/windows/images/DialogLeft.jpg differ
diff --git a/misc/dist/windows/images/gopher.ico b/misc/dist/windows/images/gopher.ico
new file mode 100644
index 00000000000..8421829d84b
Binary files /dev/null and b/misc/dist/windows/images/gopher.ico differ
diff --git a/misc/dist/windows/installer.wxs b/misc/dist/windows/installer.wxs
index 62a5e7cc0b9..ee5d22c2854 100644
--- a/misc/dist/windows/installer.wxs
+++ b/misc/dist/windows/installer.wxs
@@ -25,7 +25,8 @@
-
-
-
+
+
VersionNT >= 500
+