Peter350
Posts: 30
Joined: Sat Oct 17, 2009 1:56 pm

Another version installed: EXE vs MSI

I have a product that builds an EXE and also two MSI builds (for 32 and 64 bit).

Under Upgrades is set:

Automatically upgrade older product versions
Use Original Installation path when upgrading
Uninstall old version first

Supposing I install from the EXE. I then run the identical EXE again (no rebuild, no change of product code). I get the maintanance dialog "Modify Repair Remove" - which is correct.

However, any attempt to launch the matching MSI from the same build results in the dreaded MsgBox "Windows Installer: Another version of this product is already installed. Installation of this version cannot continue".

How does windows know the difference between the EXE and MSI from the same build?

( If I upgrade the product code and rebuild, the MSI does seem to replace the old EXE installation, at least.
And conversely, if i install from MSI, then run the EXE, it replaces the MSI installation regardless of whether I rebuild or change product code or not. )

Why the problem/confusion when both builds are the same going from .exe to MSI? Many thanks


The reason I ask is that my app is installed by either EXE or MSI, but internally downloads upgrade installers and executes them to update itself.

I am worried about losing the ability to control the installation using MSIs in Group Policy if the application has in the meantime upgraded itself by running a BootStrapped EXE.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Another version installed: EXE vs MSI

Hello,
How does windows know the difference between the EXE and MSI from the same build?
The .MSI has a separate package code then the .MSI inside the .EXE( wrapper for the .MSI ). Each time you build a package a different package code is generated for the new build so Windows Installer knows it's a different MSI.
For more information, please follow this link from our guide.
I am worried about losing the ability to control the installation using MSIs in Group Policy if the application has in the meantime upgraded itself by running a BootStrapped EXE.
This will not happen if you extract the .MSI from the .EXE and use that via group policy. Here is the link that will teach you how to do that.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Peter350
Posts: 30
Joined: Sat Oct 17, 2009 1:56 pm

Re: Another version installed: EXE vs MSI

I gather that the solution therefore, when attempting to Mix & Match installations/un-installations from both EXE and MSI installers for the same product, is not to build EXE and MSI builds separately, but instead to build one EXE and run the /extract command to extract the contained MSIs which can be distributed separately.

To this end, I have launched an Administrator cmd prompt (windows 7) at the Dir containing my built Exe installer. I create a folder called test

I then run the extract command as



myinstaller.exe /extract:"FullPathToTestFolder"

I now have in my test folder the following:

myinstaller.msi
myinstaller.x64.msi
disk1.cab
myinstaller.mst

Double-clicking on the x64 msi, I receive a prompt "please wait while windows configures myApplication" then the UAC prompt. Pressing OK on the UAC prompt, the installer immediately exits. Going to my temp folder (I have enabled voicewarmup logging) I find One .MSI log which ends with the following lines:

Code: Select all

=== Logging stopped: 04/05/2011  15:30:20 ===
MSI (c) (30:40) [15:30:20:811]: Note: 1: 1707 
MSI (c) (30:40) [15:30:20:811]: Note: 1: 2205 2:  3: Error 
MSI (c) (30:40) [15:30:20:811]: Note: 1: 2228 2:  3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1707 
MSI (c) (30:40) [15:30:20:811]: Note: 1: 2205 2:  3: Error 
MSI (c) (30:40) [15:30:20:811]: Note: 1: 2228 2:  3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1709 
MSI (c) (30:40) [15:30:20:811]: Product: myApplication -- Installation completed successfully.

MSI (c) (30:40) [15:30:20:812]: Windows Installer installed the product. Product Name: myApplication. Product Version: 1.0.0.0. Product Language: 1033. Manufacturer: . Installation success or error status: 0.

MSI (c) (30:40) [15:30:20:812]: Grabbed execution mutex.
MSI (c) (30:40) [15:30:20:812]: Cleaning up uninstalled install packages, if any exist
MSI (c) (30:40) [15:30:20:812]: MainEngineThread is returning 0
=== Verbose logging stopped: 04/05/2011  15:30:20 ===

The app has not been installed. The installer has quit for some reason but it is not clear why?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Another version installed: EXE vs MSI

Hi,

Are you using a mixed 32/64-bit installer? Please note that this type of installer uses MST (transform) files to dynamically modify the MSI based on the target platform (32-bit or 64-bit). Therefore the extracted MSI files cannot be installed directly.

A solution is to use separate installers for 32-bit and 64-bit systems. This way you can use the extracted MSI files to modify the installation (maintenance mode).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”