Installation Context
Windows Installer can install a package on a computer into two installation contexts: per-machine and per-user. A per-machine installation of the package is required to enable all users of the computer to access and use the application. Because a per-machine installation makes changes to the system that affect all users, standard users having limited privileges may be prevented from installing a package into the per-machine context without first obtaining permission.
You can specify installation context by authoring the package for per-user or per-machine installation and using the ALLUSERS and MSIINSTALLPERUSER properties. Based on these properties, Windows Installer automatically redirects the values of folder properties and registrations to locations for the per-user or per-machine context.
Shortcut Redirection
The following table compares the locations of shortcuts for per-machine and per-user installation contexts.
| Per-Machine Installation Context (ALLUSERS=1) | Per-User Installation Context (ALLUSERS="") |
|---|---|
|
Applications appear under Add/Remove Programs on Control Panel for all users of the computer. |
Applications appear only under Add/Remove Programs on Control Panel for users that have installed the applications. |
|
Shortcuts are installed to the All Users profile. |
Shortcuts are installed only to that user's profile. |
|
Icons and transforms are stored in %WINDOWS%\Installer\{ProductCode}. |
Icons and transforms are stored in %USERPROFILE%\Application Data\Microsoft\Installer\{ProductCode GUID} |
Registry Redirection
The following table compares the locations of registry entries for the per-machine and per-user installation contexts.
| Per-Machine Installation Context (ALLUSERS=1) | Per-User Installation Context (ALLUSERS="") |
|---|---|
|
Windows Installer writes or removes registry values entered in the Registry table and RemoveRegistry table, with the value -1 in the Root column, under HKEY_LOCAL_MACHINE. |
Windows Installer writes or removes registry values entered in the Registry table and RemoveRegistry table, with the value -1 in the Root column, under HKEY_CURRENT_USER. |
|
Windows Installer writes or removes registry values entered in the Registry table and RemoveRegistry table, with the value msidbRegistryRootClassesRoot (0) in the Root column, under HKLM\Software\Classes. |
Windows Installer writes or removes registry values entered in the Registry table and RemoveRegistry table, with the value msidbRegistryRootClassesRoot (0) in the Root column, under HKCU\Software\Classes. |
|
COM registration is written to HKLM\Software\Classes. |
COM registration is written to HKCU\Software\Classes. |
Folder Redirection
Windows Installer sets the values of the folder properties to the full path of the respective folder for the installation context.
The following table compares the locations of folders that are used when Windows Installer installs the package in the per-machine or per-user installation contexts.
| Per-Machine Installation Context (ALLUSERS=1) | Per-User Installation Context (ALLUSERS="") |
|---|---|
|
DesktopFolder
The full path of the Desktop folder for all users. FOLDERID_PublicDesktop (CSIDL_COMMON_DESKTOPDIRECTORY) |
DesktopFolder
The full path of the Desktop folder for the current user. FOLDERID_Desktop (CSIDL_DESKTOP, CSIDL_DESKTOPDIRECTORY) |
|
ProgramMenuFolder
The full path of the Program Menu folder for all users. FOLDERID_CommonPrograms (CSIDL_COMMON_PROGRAMS) |
ProgramMenuFolder
The full path of the Program Menu folder for the current user. FOLDERID_Programs (CSIDL_PROGRAMS) |
|
StartMenuFolder
The full path of the Start Menu folder for the all users. FOLDERID_CommonStartMenu (CSIDL_COMMON_STARTMENU) |
StartMenuFolder
The full path of the Start Menu folder for the current user. FOLDERID_StartMenu (CSIDL_STARTMENU) |
|
StartUpFolder
The full path of the Start Up folder for all users. FOLDERID_CommonStartup (CSIDL_COMMON_STARTUP) |
StartUpFolder
The full path of the Start Up folder for the current user. FOLDERID_Startup (CSIDL_STARTUP) |
|
TemplateFolder
The full path of the Templates folder for all users. FOLDERID_CommonTemplates (CSIDL_COMMON_TEMPLATES) |
TemplateFolder
The full path of the Templates folder for the current user. FOLDERID_Templates (CSIDL_TEMPLATES) |
|
AdminToolsFolder
The full path of the Admin Tools folder for all users. FOLDERID_CommonAdminTools (CSIDL_COMMON_ADMINTOOLS) |
AdminToolsFolder
The full path of the Admin Tools folder for the current user. FOLDERID_AdminTools (CSIDL_ADMINTOOLS) |
|
AppDataFolder
The full path of the Program Menu folder.
Windows Vista and later: The full path of the Roaming folder. FOLDERID_RoamingAppData (CSIDL_APPDATA) |
AppDataFolder
The full path of the Program Menu folder.
Windows Vista and later: The full path of the Roaming folder. FOLDERID_RoamingAppData (CSIDL_APPDATA) |
|
CommonAppDataFolder
The full path of the folder that contains application data for all users. FOLDERID_ProgramData (CSIDL_COMMON_APPDATA) |
CommonAppDataFolder
The full path of the folder that contains application data for all users. FOLDERID_ProgramData (CSIDL_COMMON_APPDATA) |
|
FavoritesFolder
The full path of the Favorites folder for the current user. FOLDERID_Favorites (CSIDL_FAVORITES) |
FavoritesFolder
The full path of the Favorites folder for the current user. FOLDERID_Favorites (CSIDL_FAVORITES) |
|
PersonalFolder
The full path of the My Documents folder or Personal folder for the current user.
Windows Vista and later: The full path of the Documents folder for the current user. FOLDERID_Documents (CSIDL_PERSONAL) |
PersonalFolder
The full path of the My Documents folder or Personal folder for the current user.
Windows Vista and later: The full path of the Documents folder for the current user. FOLDERID_Documents (CSIDL_PERSONAL) |
|
SendToFolder
The full path of the SendTo folder. FOLDERID_SendTo (CSIDL_SENDTO) |
SendToFolder
The full path of the SendTo folder. FOLDERID_SendTo (CSIDL_SENDTO) |
|
FontsFolder
The full path of the System Fonts folder. FOLDERID_Fonts (CSIDL_FONTS) |
FontsFolder
The full path of the System Fonts folder. FOLDERID_Fonts (CSIDL_FONTS) |
|
ProgramFilesFolder
32-bit version of Windows: The property value is the full path to the Program Files folder for all users (for example, %ProgramFiles%.) The identifier for this folder is FOLDERID_ProgramFiles (CSIDL_PROGRAM_FILES.) The identifiers FOLDERID_ProgramFiles and FOLDERID_ProgramFilesX86 represent the same folder. Files in this folder can be accessed by all users. 64-bit version of Windows: The property value is the full path to the Program Files (x86) folder for all users (for example, %ProgramFiles(x86)%.) The identifier for this folder is FOLDERID_ProgramFilesX86 (CSIDL_PROGRAM_FILESX86.) Files in this folder can be accessed by all users. |
ProgramFilesFolder
Windows Server 2008 R2 and Windows 7: The property value is the full path of the Programs folder for the current user (for example, %LocalAppData%\Programs.) The identifier for this folder is FOLDERID_UserProgramFiles on 32-bit and 64-bit systems. There is no equivalent CSIDL identifier for FOLDERID_UserProgramFiles. Files in this folder can be accessed only by the user that installed this folder.
Windows Server 2008 and earlier, and Windows Vista and earlier: No per-user capable folder is available. The path is the same as for the per-machine context (for example, %ProgramFiles% or %ProgramFiles(x86)%.) Files in this folder can be accessed by all users. |
|
CommonFilesFolder
32-bit version of Windows: The property value is the full path to the Common Files folder for all users (for example, %ProgramFiles%\Common Files.) The identifier for this folder is FOLDERID_ProgramFilesCommon (CSIDL_PROGRAM_FILES_COMMON.) The identifiers FOLDERID_ProgramFilesCommon and FOLDERID_ProgramFilesCommonX86 represent the same folder. Files in this folder can be accessed by all users. 64-bit version of Windows: The property value is the full path to the Common Files folder for all users (for example, %ProgramFiles(x86)%\Common Files.) The identifier for this folder is FOLDERID_ProgramFilesCommonX86 (CSIDL_PROGRAM_FILES_COMMONX86.) Files in this folder can be accessed by all users. |
CommonFilesFolder
Windows Server 2008 R2 and Windows 7: The property value is the full path of the Common folder for the current user (for example, %LocalAppData%\Programs\Common.) The identifier for this folder is FOLDERID_UserProgramFilesCommon on 32-bit and 64-bit systems. There is no equivalent CSIDL identifier for FOLDERID_UserProgramFilesCommon. Files in this folder can be accessed only by the user that installed this folder.
Windows Server 2008 and earlier, and Windows Vista and earlier: No per-user capable folder is available. The path is the same as in the per-machine context (for example, %ProgramFiles%\Common Files or %ProgramFiles(x86)%\Common Files.) Files in this folder can be accessed by all users. |
|
ProgramFiles64Folder
The property value is the full path to the Program Files folder for all users (for example, %ProgramFiles%.) The identifier for this folder is FOLDERID_ProgramFilesX64. There is no equivalent CSIDL identifier to FOLDERID_ProgramFilesX64. This is the pre-defined folder for 64-bit components and applies to 64-bit systems. Files in this folder can be accessed by all users. |
ProgramFiles64Folder
Windows Server 2008 R2 and Windows 7: The property value is the full path of the Programs folder for the current user (for example, %LocalAppData%\Programs.) The identifier for this folder is FOLDERID_UserProgramFiles. There is no equivalent CSIDL identifier for FOLDERID_UserProgramFiles. Files in this folder can be accessed only by the user that installed this folder.
Windows Server 2008 and earlier, and Windows Vista and earlier: No per-user capable folder is available. The path is the same as for the per-machine context (for example, %ProgramFiles%.) Files in this folder can be accessed by all users. |
|
CommonFiles64Folder
The property value is the full path to the Common Files folder for all users (for example, %ProgramFiles%\Common Files.) This is the pre-defined folder for 64-bit components and applies to 64-bit systems. The identifier for this folder is FOLDERID_ProgramFilesCommonX64. There is no equivalent CSIDL identifier to FOLDERID_ProgramFilesCommonX64. Files in this folder can be accessed by all users. |
CommonFiles64Folder
Windows Server 2008 R2 and Windows 7: The property value is the full path of the Common folder for the current user (for example, %LocalAppData%\Programs\Common.) The identifier for this folder is FOLDERID_UserProgramFilesCommon. There is no equivalent CSIDL identifier for FOLDERID_UserProgramFilesCommon. Files in this folder can be accessed only by the user that installed this folder.
Windows Server 2008 and earlier, and Windows Vista and earlier: No per-user capable folder is available. The path is the same as for the per-machine context (for example, %ProgramFiles%\Common Files.) Files in this folder can be accessed by all users. |
|
WindowsFolder
The full path of the Windows folder. FOLDERID_Windows (CSIDL_WINDOWS) |
WindowsFolder
The full path of the Windows folder. FOLDERID_Windows (CSIDL_WINDOWS) |
|
SystemFolder
The full path of the System folder. FOLDERID_SystemX86 (CSIDL_SYSTEMX86) |
SystemFolder
The full path of the System folder. FOLDERID_SystemX86 (CSIDL_SYSTEMX86) |
|
LocalAppDataFolder
The full path of the folder that contains local (nonroaming) applications. FOLDERID_LocalAppData (CSIDL_LOCAL_APPDATA) |
LocalAppDataFolder
The full path of the folder that contains local (nonroaming) applications. FOLDERID_LocalAppData (CSIDL_LOCAL_APPDATA) |
|
MyPicturesFolder
The full path of the Pictures or My Pictures folder. FOLDERID_Pictures (CSIDL_MYPICTURES) |
MyPicturesFolder
The full path of the Pictures or My Pictures folder. FOLDERID_Pictures (CSIDL_MYPICTURES) |
|
PrintHoodFolder
The full path of the PrintHood folder. FOLDERID_PrintHood (CSIDL_PRINTHOOD) |
PrintHoodFolder
The full path of the PrintHood folder. FOLDERID_PrintHood (CSIDL_PRINTHOOD) |
|
NetHoodFolder
The full path of the NetHood folder. FOLDERID_NetHood (CSIDL_NETHOOD) |
NetHoodFolder
The full path of the NetHood folder. FOLDERID_NetHood (CSIDL_NETHOOD) |
|
RecentFolder
The full path of the Recent folder. FOLDERID_Recent (CSIDL_RECENT) |
RecentFolder
The full path of the Recent folder. FOLDERID_Recent (CSIDL_RECENT) |