https://bugs.winehq.org/show_bug.cgi?id=45317
--- Comment #7 from Hans Leidekker hans@meelstraat.net --- (In reply to Piotr Caban from comment #6)
I don't know yet where the problem exactly is but I can see some issues related to the msi file content.
wine-mono-4.7.1 and wine-mono-4.7.2 have different versions but the same ProductCode. According to the documentation it's wrong. When I tried to install test msi installer that replicates this I've got following message on Windows: "Another version of this product is already installed. Installation of this version cannot continue. [...]". It will need more testing but I guess that we should block wine-mono-4.7.2 installation if wine-mono-4.7.1 is installed.
I believe it should be possible to keep the product code for minor upgrades. Vincent has been doing that in the past IIRC. MSDN does state that major upgrades should change ProductCode.
msi_check_publish returns a different value since your patch. Maybe we should get rid of that check in RegisterProduct and PublishProduct.