cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hbchai
Level 3

Nearly Impossible to Set ALLUSERS for Per-User Install as Power User

Is it just me, or does InstallShield make it incredibly difficult to dictate a per-user install on Windows XP, when running as a Power User, via setting the ALLUSERS Windows Installer property? Why isn't this exposed to installscript?

1) The ALLUSERS _variable_ can only be set for local scopes in scripts, and does not affect the ALLUSERS property.

2) Passing /V"ALLUSERS=0" on the setup command line did not work for me.

3) Setting the ALLUSER property in the Property Manager didn't work.

I prefer not to pop up the SdCustomerInformation dialog, because I already know that I want to choose per-user. Even finagling the dialog to do the right thing takes a bit of work - I had to override the value of ALLUSERS in the local scope!

Does InstallShield intend to doom Power User installs to failure, and if so why?


Haw-Bin Chai
Labels (1)
0 Kudos
(3) Replies
Alpesh
Flexera Alumni

Hi,

I believe you are using InstallScript MSI project type. To do a per-user install, you will have to set ALLUSERS to "". Or delete it from the property manager. For more information, refer to this msdn article on ALLUSERS property -> http://msdn.microsoft.com/en-us/library/aa367559(VS.85).aspx.

Also to access the ALLUSERS value in InstallScript, you will have to use MsiGetProperty function.

Thanks,
Alpesh
0 Kudos
hbchai
Level 3

Hi Alpesh,

As I mentioned, explicitly setting the ALLUSERS property (to any of blank, 0, or 2) via Property Manager doesn't work. Omitting the value doesn't work either - that was its state when we first noticed the problem. Is InstallShield overriding the value I set without telling me?

If it is supposed to work, it sounds like this is an InstallShield bug.


Haw-Bin
0 Kudos
hbchai
Level 3

This is definitely an InstallShield bug. Moreover, MsiGetProperty() is not working correctly. The inability to set ALLUSERS can be worked around by using:

MsiSetProperty(ISMSI_HANDLE, "ALLUSERS", "")


However, I've found that this only works when invoked near the end of my OnFirstUIBefore() definition. Obviously, some InstallShield dialog (or some other innocuous looking code) is manipulating this value without telling me. The only dialogs I am using are:

SdWelcome
AskOptions
SdAskDestPath
SdSelectFolder

In an attempt to debug this, I added some MessageBox() calls to try to display the value of ALLUSERS, as retrieved by MsiGetProperty(). The value is being reported incorrectly - without my explicit call to MsiSetProperty() to change ALLUSERS (only this one property), it claims that ALLUSERS is blank, but the installation fails. Adding my explicit call, it still claims that ALLUSERS is blank, yet the installation succeeds. Bug.

Haw-Bin
0 Kudos