PDA

View Full Version : SdCustomerInformation



bruno_k
06-15-2006, 02:35 PM
Is it possible to disable the 'All users' option and have the install only for the current user?

According to the documentation, this is controlled by the predefined constants/OS.

In an InstallScript installation, if the system variable DISABLE_ALLUSERBTN is non-zero the "Anyone who uses this computer [all users]" option button is disabled. If the system variable DISABLE_PERUSERBTN is non-zero, the "Only for me [<user name>]" option button is disabled.
The "Anyone who uses this computer [all users]" option button is enabled only if the target system is Windows 2000, XP, or later and the user is an administrator or power user.

Christopher Painter
06-15-2006, 02:59 PM
In a Basic MSI project the RadioGroup control on the CustomerInformation dialog is hiden if any of the following are true:

NOT Privileged ( non-privileged users can only perform per-user installs )

ProductState > 0 ( once a product is installed it can't be switched from per-user to per-machine )

Version9x ( Windows95/98/Me have no concept of a per user install )


There is nothing stopping you from changing the controls Visible Property to false and hard wiring the ALLUSERS property to what you want. Just be sure that if you wire it to per-machine install that you author a launch condition to check that the user is privileged.

RobertDickau
06-15-2006, 03:01 PM
And for InstallScript, you can set the ALLUSERS variable to FALSE, about which see the InstallScript Language Reference...

Christopher Painter
06-15-2006, 03:03 PM
Sorry, didn't notice the Sd prefix.

bruno_k
06-15-2006, 03:09 PM
Thanks! There was no visibility setting on the radios, so I just removed them. I also set the ALLUSERS var after the dialog.

RobertDickau
06-15-2006, 03:10 PM
Or you could just use SdRegisterUser/Ex if you don't want the radio buttons...