Επεξεργασία

Κοινή χρήση μέσω


MSIINSTALLPERUSER property

The MSIINSTALLPERUSER and the ALLUSERS properties can be set by the user at installation time, through the user interface or on a command line, to request that the Windows Installer install a dual-purpose package for the current user or all users of the computer. To use the MSIINSTALLPERUSER property, the value of the ALLUSERS property must be 2 and the package has to have been authored to be capable of installation into either the per-user or a per-machine context. For information about authoring a dual-purpose package, see Single Package Authoring. If the value of the ALLUSERS property does not equal 2, the value of the MSIINSTALLPERUSER property is ignored and has no effect on the installation. The value of MSIINSTALLPERUSER property is ignored when installing the package using Windows Installer 4.5 or earlier.

To request that the Windows Installer install the dual-purpose package in the per-machine installation context, the user can set the value of the MSIINSTALLPERUSER property to an empty string ("") and the value of the ALLUSERS property to 2 using an authored user interface or a command line.

To request that the Windows Installer install the dual-purpose package in the per-user installation context, the user can set the value of the MSIINSTALLPERUSER property to 1 and the value of the ALLUSERS property to 2 using an authored user interface or a command line.

If the value of the ALLUSERS property does not equal 2, the Windows Installer ignores the value of the MSIINSTALLPERUSER property. If Windows Installer installs the application in the per-machine context, it resets the value of the ALLUSERS property to 1. If Windows Installer installs the application in the per-user context, it resets the value of the ALLUSERS property to an empty string (""). Applications that have been installed per-user therefore receive all updates or repairs on a per-user basis and applications installed per-machine receive updates or repairs on a per-machine basis.

Windows Installer 4.5 or earlier: The MSIINSTALLPERUSER property is ignored by versions earlier than Windows Installer 5.0.

Default Value

The recommended default installation context is per-user for a dual-purpose package. Author MSIINSTALLPERUSER=1 and ALLUSERS=2 in the Property table of the dual-purpose package to specify per-user as the default installation context.

Remarks

You can ensure the MSIINSTALLPERUSER property has not been set by setting its value to an empty string (""), MSIINSTALLPERUSER="".

The installation context determines the values of the DesktopFolder, ProgramMenuFolder, StartMenuFolder, StartupFolder, TemplateFolder, AdminToolsFolder, ProgramFilesFolder, CommonFilesFolder, ProgramFiles64Folder, and CommonFiles64Folder properties. The installation context determines the parts of the registry where entries in the Registry table and RemoveRegistry table, with -1 in the Root column, are written or removed. For information about the installation context, see Installation Context.

Requirements

Requirement Value
Version
Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version.

See also

Properties

ALLUSERS

Installation Context

Single Package Authoring