No, there's no way to do that while still keeping the functionality your customers are 'implicitly' asking for. The only 'wrapping' in MSI you can do is to extract it on installation and start your InnoSetup installer from the temporary location where you extracted to. MSI is a fundamentally different way of working: InnoSetup (& NSIS & most other installers) take a code-centric approach: you 'program' the 'steps' to install your data. MSI is a database and takes a 'data-centric' approach: you indicate what files should be installed and the MSI 'runtime' does the rest. This gives you versioning and exact control of what goes where.
In short, to give your customers what they want (i.e., the ease of deployment that MSI brings with AD), you'll need 'proper' MSI's. Good luck with that, it's a major pain IMHO. But it does give good results once you master MSI & WiX.
First all, you shall fix your upgrade code:
<?define ProductVersion = "0.0.2.3"?>
<?define UpgradeCode = "PUT-GUID-HERE"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Name="Asd" Language="1033" Version="$(var.ProductVersion)" Manufacturer="Me" Id="*" UpgradeCode="$(var.UpgradeCode)">
Note that the product code is recreated each time you build the installation (by not using the GUID but the asterisk).
The fundamental information is the product version and the upgrade code. The product code identify the specific deployed release, while the upgrade code identity the product releases "family". Softwares having the same upgrade code can be switched with each other. Softwares having the same product codes cannot be installed toghether.
Here is the trick to make upgrade you software:
<Upgrade Id="$(var.UpgradeCode)">
<!-- Detect older product versions -->
<UpgradeVersion OnlyDetect="no" IncludeMinimum="yes" IncludeMaximum="yes" Minimum="0.0.1" Maximum="$(var.ProductVersion)" Property="PREVIOUSVERSIONSINSTALLED"/>
<!-- Detect newer product versions -->
<UpgradeVersion OnlyDetect="yes" IncludeMinimum="no" Minimum="$(var.ProductVersion)" Property="NEWERVERSIONDETECTED"/>
</Upgrade>
<!-- Exits successfully in the case newer version are already installed -->
<CustomActionRef Id="WixExitEarlyWithSuccess"/>
By using the above markup, you say to Wix abort installation when he find a product having the same UpgradeCode but the installed one has a Version greater than the current one, but begin the installation (upgrading the current one) if he find a product having the same UpgradeCode and the installed one has a Version less than the current one.
The IncludeMinimum and IncludeMaximum shall do the trick, allowing the upgrade to skip the current version.
Wix doesn't install the same product: you shall be sure that the product code is the same for installed software and MSI-packaged software: if they are different, they are different deployed softwares. Beyond this, if the product has the same product code of the MSI, the installation offers the repair/change options: to disable them you have to play with the Property table of the Wix package, by introducing the ARP_ variables (you can disable repair, change and uninstall, but also setup manufacturer contacts and other properties).
Here is the ARP variable list. I don't know what is their behavior when installing in silent mode, but if you are invoking msiexec from command line, there is a specific repair option to issue repair (/f), so how can it automatically repair your product if you are not requesting?
Best Answer
To automate the installation of an MSI package, you can use the /I option, like this:
Keep in mind that you need to specify the properties the MSI package expect the user to specify through the UI, and for which it does not have a default value.
You can use the Orca tool to see the list of properties and fiddle around with MSI conditions, etc. And to set values for the properties, you can just specify it in command line; e.g. to set a property ISDEBUG:
msiexec.exe /qn /i mypackage.msi ISDEBUG=1
Side note: To automate uninstall, use the /X option with the package or the product code:
or this (where you need to change the CLSID with your product code):