I'm handling updates for my Office add-in programmatically via my very own PHP script that checks for them, and the WindowsInstaller class in my client application.
The following 2 lines of code with a valid URL sometimes raises exceptions on some of my clients PCs:
String UpdateString = "https://www.example.com/installers/AppInstaller.msi";
Installer.SetInternalUI(InstallUIOptions.Full);
Installer.InstallProduct(UpdateString, "ACTION=INSTALL ALLUSERS=2 MSIINSTALLPERUSER=");
The exception is the following:
Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
I got the arguments from the post below, and they've been working in a very large number of cases, but there are 1-2 users out of 50 who will bump into this issue on their PC... https://stackoverflow.com/a/12416878/3609107
I suspect there could be a permission related issue for some of the users, although the ALLUSERS=2 statement makes sure, that if the user doesn't have sufficient permissions to install per machine, then it will downgrade to ALLUSERS=1, and install for user (as I understand it from the short documentation i've found for it).