|Can't query whether Per User or Per Machine!|
Windows Installer makes a lot of the difference between a per-user or per-machine installation and while the developer of an msi can influence the the install type, they can not control it.
If you wish to conditionally allow the installation based on type of need to alter behaviour then you need to know which type it is. Windows Installer neither provides the mechanism nor documents the solution!
This solution (condition) has been proposed:
#define CONDITION_PER_MACHINE Version9X or (ALLUSERS=1) or (ALLUSERS=2 and Privileged)
I don't think the above is correct and my current theory is that this should be used:
#define CONDITION_PER_MACHINE Version9X or (ALLUSERS = 1) ;;True if per-machine install. #define CONDITION_PER_USER not (<$COND_PER_MACHINE>) ;;They are mutually exclusive conditions
This relies on the fact that all Win9X installs are per-machine and an ALLUSERS value of "2" will be translated by Windows Installer to be null or 1.