These are the sources of the PostGIS installer for Win32.

PostgreSQL for Windows is available from 
http://pgfoundry.org/projects/pginstaller

PostGIS is available from http://www.postgis.org

The PostGIS installer for Windows is available from http://www.postgis.org/download/windows/

The installer uses Nullsoft Installation System,
available from http://nsis.sourceforge.net

This also relies on ExecDos -- which you can download from http://nsis.sourceforge.net/ExecDos_plug-in and copy the dll to your
NSIS plugins directory (where you installed NSIS)

2013-04-13 Leo Hsu and Regina Obe
FOR THOSE IN A HURRY AND WHO DON'T WANT TO BOTHER compiling their own PostGIS
But need to release as part of a bigger setup package
----------------------------------------------------------------------------------
If you just need to customize the install process for your own specific deployment.
If you need to regenerate the inputyfile.nsh or uninstallfiles.nsh you can use the
geninputfiles.sh and genuninstallfiles.sh scripts from a mingw or other unix like shell.

# Create an initial entry for libiconv-2.dll - we only overwrite if it doesn't already exist

echo "SetOverWrite on" > inputfiles.nsh
# Generate the remainder of the input files
./geninputfiles.sh >> inputfiles.nsh

-- to generate the uninstall --
./genuninstallfiles.sh > uninstallfiles.nsh

1) Download the windows full  binary setup from 
http://postgis.net/windows_downloads

2) Right-click the installer exe and extract -- the exe is really just a self-extracting zip file.
Sometimes for whatever reason, the postgisgui and other files do not fully extract.  
You can copy these from the binary builds - http://www.postgis.org/download/windows/#winbinaries.
You'll know this is the case if you get an error when you go to compile the .nsi script.
3) Copy the extracted files to the distfiles folder
4) Copy the extracted contents except for the $COMMONFILES and $PLUGINSDIR to the disfiles folder.
5) Customize the inputfile.nsh and postgis.nsi to your liking leaving out whatever you want and adding in extra stuff you want.
6) Right click the .nsi file and click the compile button. 
7) Congratulations, you should have your very own version of the PostGIS setup exe.


HOW TO USE THE NEW BUILD SYSTEM
-------------------------------
--- WARNING: THE INSTRUCTIONS BELOW THIS WARNING ARE OBSOLETE AND WE HAVEN'T HAD TIME TO UPDATE THEM -- 
-- YOU DON'T REALLY NEED THESE INSTRUCTIONS UNLESS YOU WANT TO COMPILE FROM SOURCE --
Short answer -- read this http://trac.osgeo.org/postgis/wiki/UsersWikiWinCompile to learn how to compile on windows
You can probably glean hints from using the win32build.sh but will have to customize it a lot for your specific needs.
--- END WARNING --

