View Full Version : How to Setting Property "ALLUSERS"

11-19-2004, 11:31 AM
I need to set the property ALLUSERS for an installation. Where in the Express X user interface option that I use to set ALLUSERS? Do I have to use a custom action?

11-19-2004, 12:14 PM
I believe you will have to use a custom action.

11-24-2004, 07:09 AM

The ALLUSERS Option can be set by selecting "Yes" in Show All Users Options in Customer Information Dialog to install the product for all users.

Thanks & Regards.

11-24-2004, 10:35 PM

No need to use the custom Actions.
In the Customer Information Dialog properties , there is an option Called Show All User Option , just set it to "NO"

While installing , the options to select the Users will not be displayed, hence by default, ALLUSERS Property will set to all users and user cannot modify the option


12-25-2004, 03:47 PM
I'm just researching this issue. Seems as the user documentation indicates that a command line argument or custom action is required if the "Customer Information" dialog is to be avoided. Useful URL on the topic:


MsiExec.exe /I project.msi ALLUSERS=1
Setup.exe /V"ALLUSERS=1"

I don't want the user to select via the "Customer Information" dialog and if the "Show All User Option" is disabled for this dialog, then the default setting of '2' is the only choice.

Summary -- to force an ALLUSERS=1 installation (insufficient privileges error abort):

1. Modify custom action 'ISInitAllUsers' target value to '1' from '2' (effectively ALLUSERS=1)
ISInitAllUsers 307 ALLUSERS 2 Initializes ALLUSERS property

2. Set "Customer Information" dialog "Show All Users Option" as not selected (="No") to hide the
user selectable option of "Current User."

3. Delete table entry row for Control Events to prevent the alternative action.
CustomerInformation Next [ALLUSERS] {} ApplicationUsers = "OnlyCurrentUser" And Privileged 2

Observation: the radio button control does not seem to override to '1' the default initialized
custom action 'ISInitAllUsers' that sets ALLUSERS=2, even when the second order event is removed.


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.

ISX does not create an ALLUSERS entry for the property table but rather assigns the ALLUSERS property via the 'ISInitAllUsers' custom action property 'ApplicationUsers' which is called via the 'InstallExecuteSequence' and 'InstallUISequence' and initiallized with a value of '2.' The action is prevented from being called twice via the 256 flag attribute added.

Custom Action Info:
ISInitAllUsers 307 ALLUSERS 2 Initializes ALLUSERS property

Custom Action Type: 307 = 51 + 256
Target= 2 [ALLUSERS=2]

Custom Action Type 51
A formatted text string.
Property name or key to the Property table. This property is set by the formatted string in the Target field.

Custom Action Option:
Execute once if present in both sequence tables. Skips action in execute sequence if UI sequence has run. No effect in UI sequence. Not affected by install service registration.

The the "Customer Information" dialog radio button group has AllUsers (ALLUSERS=1) selected by default and OnlyCurrentUser (ALLUSERS={}) is user-selected via the second not selected radio button. If the "Customer Information > Show All Users Option" is not selected (="No"), the control is enabled but not visible, meaning the default value of ALLUSERS=1 is used.

If a hard-coded ALLUSERS property is added to the property table, ISX issues a build warning, as follows:

"ISEXP : warning -6261: The property ALLUSERS is defined in the property table. This may result is a setup that is always installed per-machine when it has been advertised as a per-user install. It is recommended that the ALLUSERS property not be defined in the Property table."

A Control Event "CustomerInformation" then first attempts to install to ALLUSERS=1 and if fails, tries OnlyCurrentUser ALLUSERS={} (null value). MSI documentation indicates that only one event can fire -- the highest order. AllUsers is ordered #1 and OnlyCurrentUser #2. This behavior appears to mimic the standard MSI ALLUSERS=2 (see below MSI help excerpts). If a forced ALLUSERS=1 is desired, then deleting the second control event *should* prevent the alternate OnlyCurrentUser attempt.

I deleted the second event, which should prevent a failure to install with admin privileges for ALLUSERS=1 but it does not. Evidently the initial ALLUSERS=2 value initialized by the custom action 'ISInitAllUsers' takes precedence -- why, I don't know. Presumably the hidden control for selecting 'AllUsers' is not disabled, just hidden since it has a value of '3' vs. '2' (1+2=3 - 1=visible;2=enabled) when the "Customer Information" dialog "Show All Users Option" is not selected (="No").

ApplicationUsers = "AllUsers" And Privileged
ApplicationUsers = "OnlyCurrentUser" And Privileged

Attribute=2 [2=enabled; 3=enabled & visible]

ApplicationUsers = "AllUsers" And Privileged
[ALLUSERS={}] (null)
ApplicationUsers = "OnlyCurrentUser" And Privileged

Radio Button
Property: ApplicationUsers

[MSI Help]
Every RadioButtonGroup control is associated with a property. The default value for this property must be initialized in the Property table. Within each RadioButtonGroup specified in the RadioButton table, there may be one radio button that has a value in the Value field that matches the default value for this property. This is the default button for the RadioButtonGroup control. The default button is initially shown as selected in the control.

The ControlEvent table allows the author to specify the Control Events started when a user interacts with a PushButton Control, CheckBox Control, or SelectionTree Control. These are the only controls users can use to initiate control events. Each control can publish multiple control events. The installer starts each event in the order specified in the Ordering column. For example, a push button control can publish events to initiate a transition to another dialog box, exit the dialog box sequence, and begin file installation. The exception is that each control can publish a most one NewDialog or one SpawnDialog event. If multiple NewDialog and SpawnDialog control events are selected for the same control, only the event with the largest value in the Ordering column gets published when the control is activated.

If ALLUSERS is not set, the installer does a per-user installation. If the ALLUSERS property is set to 1, the installer attempts a per-machine installation. The per-machine installation succeeds only if the user has administrative access privileges on the computer. If ALLUSERS is set to 2, the installer first attempts a per-machine installation. In this case, the per-machine installation succeeds only if the user has administrative access privileges on the computer, otherwise the installer does a per-user installation. If ALLUSERS is set to 2, the installer always resets ALLUSERS property to null or 1 based upon whether it determines to do a per-user or a per-machine installation.