swc-windows-installer.py: Search ProgramW6432 and ProgramFiles(x86)
It turns out that the 'ProgramFiles' environment variable is set
differently depending on the architecture of process in question. To
always get the 32-bit x86 version, you should use 'ProgramFiles(x86)'
[1]. To always get the 64-bit amd64 version, you should use
'ProgramW6432' [2].
To be safe, and support both 32- and 64-bit Windows installs, just
search everything that could be relevant. Prefer 64-bit locations
(when we have any).
[1]: http://technet.microsoft.com/en-us/library/
cc749104%28v=ws.10%29.aspx
Recognized Environment Variables
...
CSIDL_PROGRAM_FILES Version 5.0. The Program Files folder.
A typical path is C:\Program Files.
...
PROGRAMFILES Same as CSIDL_PROGRAM_FILES.
PROGRAMFILES(X86) Refers to the C:\Program Files (x86) folder on
64-bit systems.
[2]: http://msdn.microsoft.com/en-us/library/windows/desktop/
aa384274%28v=vs.85%29.aspx#Environment_Variables
WOW64 Implementation Details
...
64-bit process:
ProgramFiles=%ProgramFiles%
ProgramW6432=%ProgramFiles%
32-bit process:
ProgramFiles=%ProgramFiles(x86)%
ProgramW6432=%ProgramFiles%
The ProgramW6432 and CommonProgramW6432 environment variables
were added starting with Windows 7 and Windows Server 2008 R2.