If this is an upgrade to the same product, then the UpgradeCode should be the same and it should remove the existing product if you have a proper Upgrade table setup. (No need for a custom action.)
<Upgrade Id="$(var.UpgradeCode)"> <UpgradeVersion Minimum="$(var.ProductVersion)" IncludeMinimum="no" OnlyDetect="yes" Property="NEWERVERSION_INSTALLED" /> <UpgradeVersion Minimum="$(var.MinimumUpgradeVersion)" IncludeMinimum="yes" Maximum="$(var.ProductVersion)" IncludeMaximum="no" Property="OLDERVERSION_BEINGUPGRADED" MigrateFeatures="yes" /> <UpgradeVersion Property="ANYVERSION" IncludeMinimum="yes" Minimum="0.0.0.0" Maximum="99.99.99.99" IncludeMaximum="yes" OnlyDetect="yes" /> </Upgrade> The next question is when do you have RemoveExistingProducts scheduled? <InstallExecuteSequence> <RemoveExistingProducts Before="InstallInitialize" /> </InstallExecuteSequence> (You can schedule it before InstallInitialize which will remove it before installing the new product, or you can schedule it after InstallFinalize. If you do it after InstallFinalize, then components which aren't changed between packages won't change.) What component is it that is refusing to update? Is it a binary file with version info? If so, the version number needs to be different (possibly higher) or the upgrade won't update it. If it's a text/data file, then if it was modified post install I also believe the uninstaller won't remove it. If it is a user modified data file and it must be removed, then you can add <RemoveFile Id="Purge.UserModifiedFile" Name="FileName.ext" On="uninstall" /> to the component. (Note, this won't fix existing installers in the wild, but will fix future updates to a new installer released.) -----Original Message----- From: Steven M. Drucker II [mailto:smdruc...@hotmail.com] Sent: Monday, October 31, 2011 7:08 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] msi made up of only 1 custom action Hello, I am only 2 weeks into learning WIX and haven't done much beyond the installer stuff that comes canned in VS so bear with me. I was confronted with a challenge at work concerning an upgrade package that is simply refusing to replace a file. The guy who normally builds it insists he has taken all the usual steps and due to time constraints I have to take him for his word. I was able to write a wix component that uninstalls our products with a call to msiexec in a custom action. This project has no file or directory components, not even a feature (now that I write this I am wondering if the lack of a feature is what my problem is). It's a simple dll that makes a call to msiGetEnumeratedProducts and iterates through each product code related to a given upgrade code and uninstalls it. When I run this by itself, it removes the products and all is well. However, we also want to install the new product so I generated a bootstrap manifest, built that and got my msi, the installer and a new setup.exe which I imagine wraps the chain that calls each package. When I run the setup.exe however, it sees the project with custom actions then acts like its running it and proceeds to the exe but it doesn't actually run. Again when I click on the msi that is just the custom action that the bootstrap manifest generated for its output, it runs fine. I've lurked and know you guys will ask for log files however when I try and run the bootstrappers setup.exe (the chain wrapper) through msiexec I get an error saying it's not a recognized something or other and won't run and since that is where the problem exists, im at a loss. Any help would be greatly appreciated Steve ------------------------------------------------------------------------ ------ Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World™ now supports Android™ Apps for the BlackBerry® PlayBook™. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ RSA® Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users