1

We have 2 installer sources in WiX to create installer for a single product with same Product Version, GUID and Package GUID also.

Those 2 installer projects will yield different outputs, one output being just a single MSI file (File1.msi) and other project output is a CD-ROM structure having different MSI file name (File2.msi).

So now issue arises when we installed the product using single MSI file, upon that if we invoke MSI from the other CD-ROM output, we end up getting below mentioned error.

WiX dialog

I tried keeping same MSI filename for both kind of installer output, then this above error dialog was resolved but repair functionality isn't working.

If some files were deleted in the product's destination folder, it says source file not found error pointing to CD-ROM installer source folder.

Please help where I'm going wrong. I want to support Repair installation without this errors.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
SiD
  • 109
  • 1
  • 8

2 Answers2

3

The dialog is expected. You can't change the name of the MSI except during major upgrades.

After that, if you rebuilt to create the different layouts, each MSI probably has a unique PackageCode and that makes them unique packages. That is most likely why repair isn't working. A verbose log file should tell all.

Rob Mensching
  • 33,834
  • 5
  • 90
  • 130
  • I also mentioned that I tried keeping same name of MSI but still repair was getting error which I explained in my question. How to resolve this and get my repair done? – SiD May 21 '19 at 04:37
  • I also mentioned that if you rebuild the MSI you are getting a unique `PackageCode` and that is most likely why repair isn't working once you stop changing the name of the package. To solve this, don't rebuild the MSI. – Rob Mensching May 21 '19 at 08:02
  • No, in my case I'm not using '*' either for product or package GUID's. So after keeping the name same, both type of installers share same product and package GUID's. Still I get the error for repair. – SiD May 21 '19 at 08:54
  • ResolveSource is the action that throws the above error (comes from installed File1.msi). Can we execute any custom action before ResolveSource which will uninstall the product (File1.msi) and then can we continue with msi installation (File2.msi)? – SiD May 22 '19 at 11:36
  • Also tell is it possible to run some batch script or any code just immediately after invoking the msi, so that the script uninstalls the product and I can continue File2.msi without above error. – SiD May 22 '19 at 11:40
  • Could you please reply on this https://stackoverflow.com/questions/56214935 as well? – SiD May 24 '19 at 05:13
  • @SiD I answer questions on StackOverflow for fun. If you want guaranteed answers from me, [my company offers professional support](https://www.firegiant.com/services/). – Rob Mensching May 28 '19 at 05:48
0

Updated: Compile your main MSI, then run administrative image on it and put the extracted files and MSI on the CD? Put the compressed version on there as well - just in case they prefer that kind of release (happens).

I am not sure what will happen when you run both setups this way, but I think the MSI flagged as an administrative image extract might be detected by the engine. I am not sure. Should work. Built-in approach for MSI, and you are not fighting wind-mills.


User Accounts: Are you creating any NT User Accounts? Did you set the FailIfExists attribute to yes? Please check here: User Element (Util Extension). What is the setting for UpdateIfExists? (if any).

Other Issues: There might be other issues as well as Rob mentions. You can not use the same package code for both release types because a package code by definition identifies a unique file. All kinds of X-Files-like problems occur if you try to "hack" this. Not a fight you want to take on.

Administrative Installation: Why would you want to distribute different setups on CDs these days? Corporations that use your setup will run an administrative installation on your setup extracting all files - which is a much better concept. It is essentially a glorified file-extraction, and it is a built in Windows Installer concept intended to make a network installation point for software - among other things. It essentially extracts all files and translates the Media table to use external source files.

List of Links:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • ResolveSource is the action that throws the above error (comes from installed File1.msi). Can we execute any custom action before ResolveSource which will uninstall the product (File1.msi) and then can we continue with msi installation (File2.msi)? – SiD May 22 '19 at 11:36
  • That might look like a small thing, but is is a hugely involved technical issue. Don't go there (be dragons). ResolveSource detects that there is a mismatch between the Media table settings and the actual source folder (or embedded files). Suggestion: Use a compressed MSI on the CD as well. Even if it is very big. Add a PDF help document to explain how to extract files and make a network installation point? You can even deliver the extracted files as a ready-made administrative image as well (all files extracted and the MSI translated by the MSI-engine itself to use external source files). – Stein Åsmul May 22 '19 at 12:30