How do I always install some resources in the "C:\Windows\System32" path, regardless the plaform?
The following article uses options that are available starting with the Professional edition and project type.
On 64-bit operating systems, whenever a 32-bit application writes or reads a value from the C:\Windows\System32 directory , the application actually reads from the C:\Windows\SysWOW64 directory.
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 Windows Installer's default behavior. On 64-bit systems, a 32-bit installation package cannot install resources into 64-bit locations. For further information about the topic, please see our article about package types.
Choosing the Mixed 32/64-bit matching the platform option in the Install Parameters section is the right way. This way, the package runs as a 32-bit package on 32-bit systems and as a 64-bit package on x64 systems.
Because .MSI does not accept mixed package types, the package type will be converted to .EXE. Advanced Installer creates a 32-bit.EXE bootstrapper that contains the x86 and x64 MSI files, as well as the contents to be installed from the CAB. When the EXE is started, it determines the operating system architecture and launches the appropriate MSI.
Expand the Windows Volume folder on the Files and Folders tab for 64-bit operating systems, then store the files in the System 64 folder. Expand the Windows Volume folder on the Files and Folders tab for 32-bit operating systems and store 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.
If 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.