I have made an installer that attempts to remove a previous version of a
product before installing the new version.The installer runs and appears to
remove old files and coy new ones... but it at the end of it all there are
files missing.

I have a merge module that installs a common component into "Program
Files\Company Name\commonThing" and the same merge module is used in version
1 and version 2 of my product.   It is some files from the common
component(s) that are missing after installing version 2.

I used the following blogs as reference for my major upgrade installer

http://blogs.technet.com/alexshev/archive/2008/02/15/from-msi-to-wix-part-8-major-upgrade.aspx
http://johnmcfadyen.spaces.live.com/blog/cns!9DD01136FC094724!249.entry

In particular I choose to schedule the RemoveExistingProducts action to
emulate a full uninstall followed by an install.

I have a comment in my code that I've copied from somewhere on the interweb
that says:

<!-- <RemoveExistingProducts After='InstallValidate'/> Don't do this on
Vista for things that use VC 2005 merge modules -->
      <!--
      When RemoveExistingProducts is sequenced in the InstallInitialize area
you effectively get
      an uninstall of the old product followed by an install of the new
product. All other things
      being equal, this means that file versions and Component guids are
irrelevant.
      When sequenced in the InstallFinalize area the install of the new
product happens over the
      old product, so file versioning rules apply to each file being
installed. Component guids
      also matter because RemoveExistingProducts uses ref counting to decide
whether to remove
      the old files or just decrement the reference count. The components in
the new install
      (files and registry items) are effectively being shared with those in
the new product, so
      it's important to follow component rules.
      If you want an upgrade to behave as if the user uninstalled the old
product then installed
      the new one, then sequence RemoveExistingProducts in the
InstallInitialize area.
      -->
      <RemoveExistingProducts After="InstallInitialize"/>


I realize now that I don't even now which 'side' of InstallInitialize counts
as "in" the InstallInitialize area. Is it "before" or "after"?  (It seems
that both would be "outside" of the actual InstallInitialize of course)

In any case I don't want to get fancy, a complete uninstall/reinstall is all
I need, not some fancy "only change the bits that need changing" thing that
is surely going to go wrong. I just want it to work.  It doesn't.  I'm lost.
 Please help. :-)

My merge module for the common parts of course uses the same component GUIDs
in both products and installs all files to the same paths.

If I launch the version 2 installer again and choose to repair the existing
install, then it clues in to the fact that files are missing and installs
them.

Thanks in advance,

Scott
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to