Beginning with the 5.0 version Windows Installer offers support for creating packages that can be installed in either per-user or per-machine type.
Package Creation Guidelines
Add the InstallType dialog to the project. This dialog will set the MSIINSTALLPERUSER and ALLUSERS properties to the correct values.
Use the "Current User/Local Machine" registry hive as it will be automatically redirected. Also the HKEY_CLASSES_ROOT hive will be redirected to HKCU\Software\Classes in a per-user installation or to HKLM\Software\Classes in a per-machine installation.
Use one of the folders that will be redirected to install files:
- Program Files / Program Files 64 - will be redirected to %LocalAppData%\Programs in a per-user installation.
- Common Files / Common Files 64 - will be redirected to %LocalAppData%\Programs\Common in a per-user installation.
Do not write in global system folders:
- Administrative Tools
- Common Application Data
- Windows Volume
For a more comprehensive help please see Single Package Authoring page.