I have an internal MSI placed on a network drive, and I’d like to write a login script so that anyone on our network can get the MSI installed onto their machines, or to get it auto-reinstalled whenever the MSI is updated (which happens often).
If I use msiexec.exe /i REINSTALL=ALL it will do nothing if the MSI has not yet been installed on that machine. If I leave out the REINSTALL=ALL, then it will do fresh installations, but will not do update/reinstall.
What parameters should I choose to make it do a fresh installation if the package was not yet installed, and to do a full reinstall if the package was already installed?
Running msiexec /i first followed by a reinstall might work, but I’d like to avoid that if possible.
EDIT: The reason /famus is needed is that these are developer machines, and someone might manually update the registry or register a different set of dlls. The intention of the script is that even if there has not been any changes to the MSI, the developer can also run the script to easily revert back to “official” environment.
I solved it in the end with a batch file that runs msiexec /famus first, and if the exit code is 1605 it will run msiexec /i.