Inconsistent MSI behavior

199 views Asked by At

We use InstallAware 18. I've noticed some inconsistent behavior.

Installation Context changes without my knowing. If I double click on the MSI I've built I usually can expect a per-User Installation. That's fine for us. HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyApp.msi

However, after a few hours of testing the msi in a Powershell script, the MSI ends up doing a per-machine installation HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\MyApp.msi

NOTE:
Even if I use msiexec.exe, I run into this issue. I'm not using the ALLUSERS property from the command line, nor do I have the value set in the MSI.

1

There are 1 answers

2
ezG On

[Credit to: Stein Asmul. The Links he posted gave me better questions to ask and got me on the trail to my eventual answer]

If you don't set the ALLUSERS property to some value yourself, the system will pick whatever it deems best (e.g. Is the install running as an Admin, or a regular user)

Now, I set ALLUSERS to "TRUE" within my MSI script. When I double click on the file, I get a Per-machine install.

NOTE: (/q flag seems to ignore 'ALLUSERS' property)
msiexec.exe /i myapp.msi -- gets a per-machine install.
msiexec.exe /i myapp.msi /qn -- get a per-user install.

After repeated testing, I can say that /q definitely causes MSIEXEC.exe to ignore ALLUERS=TRUE (or change it to FALSE). I'm not sure why. Perhaps this is unique to the InstallAware product; I can't be sure; I'm still learning