Msi troubleshooting

From wikinotes

Save Install Log

msiexec /log log.txt /i file.msi

MSI's chosen installpath is ignored

It is possible for a user to not be an administrator, but be assigned some administrator privileges.

If the GUI indicates a TARGETDIR property (ex: C:/Program Files/YourApp), but your program is actually being installed to ROOTDRIVE (ex: D:/), this is likely a permissions issue.

Your user may not have permission to set TARGETDIR, the msi log will show it being rejected, and re-set to ROOTDRIVE. I have not resolved this personally, but apparently you can add TARGETDIR to the MSI property SetCustomProperties when writing your .msi.

Some useful docs while researching:

explanation of issue https://groups.google.com/forum/?hl=nl#!topic/microsoft.public.platformsdk.msi/I1nebMg8Oy8
microsoft docs on SecureCustomProperties msi property https://docs.microsoft.com/en-us/windows/desktop/Msi/securecustomproperties
set properties in existing msi file https://stackoverflow.com/questions/1609250/how-do-i-add-update-a-property-inside-an-msi-from-the-command-line
check if user is real administrator https://superuser.com/questions/667607/check-if-current-command-prompt-was-launched-as-the-administrator
python's bdist_msi supports --pre-install-script where you could inspect/reject install based on true administrator status
this issue in python's bugtracker https://bugs.python.org/issue1298962