How do I always install some resources in the "C:\Windows\System32" path, regardless the plaform?

ImportantThe following article uses options that are available starting with the Professional edition and project type.

When a 32-bit application writes or reads a value under the C:\Windows\System32 directory , the application reads from the C:\Windows\SysWOW64 directory on a 64-bit operating systems.

Their 32-bit counterparts are resolved to redirected locations as follow:

  • ProgramFilesFolder - C:\Program Files (x86)\
  • CommonFilesFolder - C:\Program Files (x86)\Common Files\
  • SystemFolder - C:\Windows\SysWOW64\

This is the default behavior of Windows Installer. A 32-bit installation package, on 64-bit machines, cannot install resources into 64-bit locations. For details, please check the package type article.

The correct approach is to select the Mixed 32/64-bit matching the platform option in the Install Parameters page. This way, the package runs as a 32-bit package on 32-bit systems and as a 64-bit package on x64 systems.

The .MSI does not support mixed package type, thus the package type will be turned into an .EXE package type. The .EXE bootstrapper built by Advanced Installer is a 32 bit one, this contains the x86 and x64 MSI files as well as the files to be installed from the CAB. When launched the EXE checks for the operating system architecture and it launches the correct MSI.

For 64-bit operating systems, in the Files and Folders page expand the Windows Volume folder and place the files in the System 64 folder. For 32-bit operating systems, in the Files and Folders page expand the Windows Volume folder and place the files in the System folder.

The folders in the Files and Folders page use predefined and custom installer properties which store their paths. For details, check the Paths of the folders in the "Files and Folders"article.

ImportantIf the same source of the file is specified, the file will not be added twice, it will be added once so the package size will not increase.