3

I have an MSI that setups my application. It has a single component and installs only to %PROGRAMFILES% (no shared binaries). Simplified, it looks like this

Msi file, Monday build:
    Program.exe  (v1.0.0)
    ThirdPartyLibrary.dll  (v2.0.1)

Now, if I discover a bug in the program caused by my upgrade of the ThirdPartyLibrary dll from v2.0.0 to v2.0.1, and thus revert the reference to v2.0.0, it seems my MSI doesn't automatically replace the file in the installation directory?

Msi file, Tuesday build:
    Program.exe  (v1.0.0)
    ThirdPartyLibrary.dll  (v2.0)  <- downgraded

What is the best practice here to ensure that the program folder always contains exactly the binaries in my setup? Should I a) wipe everything from the setup directory before copying the new files? Is there an option (in Wix) I can use that makes the msi force an overwrite of all files regardless of version?

What if I remove a file from the setup (a file that would cause errors if present at runtime), then the only way to have a working program after the setup, would be if it deleted all files first?

Anders Forsgren
  • 10,827
  • 4
  • 40
  • 77
  • From the installer point of view the Tuesday build should contain v2.0.2 being the fix for v2.0.1. As it is now, if you have the monday msi installed there is no need to do anything on tuesday, you already have a newer version of the dll.... I assume you know the [tutorial](http://wix.tramontana.co.hu/tutorial/upgrades-and-modularization) – rene Jan 02 '13 at 12:46
  • The thing is there is no v2.0.2, and I can't make one since it is a third party library in which I discovered that upgrading caused a problem with my application. So what I need is for the NEWER (Tuseday) version of MY application to contain the OLDER version (v2.0.0) of the third party library. I can't find this mentioned in the tutorial, do you know if it is mentioned there? It has to be a rather common problem? – Anders Forsgren Jan 02 '13 at 13:00
  • I guess a replacing ourself should work: http://wix.tramontana.co.hu/tutorial/upgrades-and-modularization/replacing-ourselves you can also try to join the [wix-users mailing list](http://sourceforge.net/mailarchive/forum.php?forum_name=wix-users) – rene Jan 02 '13 at 13:09

1 Answers1

1

You can use a msi trick. In the File table in the msi database edit the Version column and enter a higher version, 3.0 for example. This way you will take advantage of the file versioning rules.

Ciprian
  • 3,533
  • 1
  • 18
  • 22