Summary
This article explains how to author an installation for All Users on Windows NT/2000/XP and later.
Synopsis
An installation package can be installed for all users by setting the Windows Installer property ALLUSERS. The ALLUSERS property can be set by passing this property as a command-line argument to the installation, with a custom action or by adding the property to the Property Manager. In addition, this property will also be set from the Customer Information dialog at install time.
Discussion
ALLUSERS Options
The ALLUSERS property can be set to NULL, 1, or 2 depending on the following options:
- ALLUSERS=NULL: This installs the package for the current user.
- ALLUSERS=1: This installs the package for all the users on the machine provided the user has administrative privileges. If the current user running the setup on Windows NT or 2000 does not have administrative privileges, then the setup errors out and aborts.
- ALLUSERS=2: This checks the user's privileges for administrative rights. Pending the outcome of this check, it installs for all users if the user has enough administrative privileges; otherwise, it installs for the current user.
Setting ALLUSERS Via Command-line Argument
To pass the ALLUSERS property, use the following command-line parameters:
MsiExec.exe /I project.msi ALLUSERS=2Setup.exe /V"ALLUSERS=2"
You can set ALLUSERS to NULL, 1, or 2. See the ALLUSERS Options section above for more on this options.
Setting ALLUSERS Via a VBScript Custom Action
The ALLUSERS property can be set to the desired value via a VBScript custom action.
NOTE: The VBScript custom actions can only be invoked during a normal mode and not silent mode in Express. Thus, if your users are running the setup silently, use the command-line option above as opposed to the VBScript custom action to set the ALLUSERS property.
Following is a typical example of a VBScript custom action that sets this property:
- Make a blank text file and call it setproperty.vbs.
- Open the setproperty.vbs file in Notepad and add the following line:
SESSION.PROPERTY("ALLUSERS")="2"
The ALLUSERS property can be set to {}, 1, or 2. '{}' sets ALLUSERS to NULL. See the ALLUSERS Options section above for more information on these options. - Add a VBScript custom action in your Express project that points to setproperty.vbs.
NOTE: By default the ALLUSERS property is set to NULL.
Setting ALLUSERS via the Customer Information Dialog
If the setup includes the Customer Information Dialog, then the user can set the ALLUSERS property via the Customer Information Dialog when running the setup in normal mode.
On the Customer Information Dialog, selecting:
- Anyone who uses this computer radio button performs an ALLUSERS installation.
- Only for Me radio button performs a per-user installation.
Additional Information
- For more information on the ALLUSERS property, see the Windows Installer Help Library topic ALLUSERS.
- Additional information is to be found in HelpNet, discussing the topic of Per-User vs. Per-Machine Installations.
- Additional steps may need to be taken if installing without Administrator level permissions. This is discussed in article Authoring an Installation That Always Installs Regardless of User Privileges.
- With the use of Windows Installer 5.0 and later note MSIINSTALLPERUSER property 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. Reference MSDN article: MSIINSTALLPERUSER property.
Related Articles
Get an application's install location from installer evidence 17Number of Views InstallShield Prerequisites for .NET Framework 3.5 SP1 on Windows 7 and Later, Windows Server 2008 R2 and Later 6Number of Views Prerequisites for Installing Inventory Manager / Flexnet Manager Platform on Windows Server 2008 5Number of Views Install To The Users\Public Directory In Windows Vista & Later 3Number of Views Error 2885 when installing the agent on Windows 5Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago