Hello @Pushpala, Thejesh ,
Thanks for reaching out.
The difficulty you might be experiencing could potentially relate to a Windows Installer Mutex conflict, which is logged as Error 1618. This situation might occur because a batch script initiates the uninstallation process and then exits almost immediately, and as a result, the WiX Burn engine might assume the batch step is fully completed. Consequently, it attempts to start the new MSI installation while the old msiexec.exe process may visibly still be running in the background, which I believe causes the two installation systems to clash.
To resolve this problem, I would suggest looking into a standard alternative, and perhaps the cleanest approach could be utilizing the built-in <MajorUpgrade> element directly within your new MSI. Generally, you do not need a batch file to uninstall older versions, therefore configuring your new MSI to automatically upgrade the old package using their shared UpgradeCode could resolve the timing conflict. Inside the WiX source code (.wxs file) of your newer MSI, you could simply incorporate the following element:
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
Alternatively, if modifying the MSI source is not feasible and the old driver belongs to an unrelated third-party package that you must remove by its Product Code, I would recommend avoiding the batch file altogether. Instead, you could call msiexec.exe directly within your <ExePackage>, which would allow the WiX engine to accurately track the external process state and ideally wait for it to finish gracefully, possibly adapting your configuration as follows:
<ExePackage Id="ODBCUnInstall"
DisplayName="InterSystems ODBC Driver (32-bit)"
SourceFile="[SystemFolder]msiexec.exe"
InstallCommand="/x {BAB6C24A-9D62-4317-A22E-78A0ABF2DD4F} /qn /l*vx log.txt"
InstallCondition="(EXISTINGFILEVERSION...)" />
For further context, I would invite you to review some official documentation that might provide more insights, starting with the WiX Toolset Documentation regarding Major Upgrades. Moreover, you can find additional details about mutex conflicts in the Microsoft documentation covering Windows Installer Error 1618.
Disclaimer: Some links are non-Microsoft website. The pages appear to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classifies as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.
I hope these suggestions may point you in the right direction. If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide for your confirmation.
Thank you.