Hi All, I am trying to get my MSI to uninstall an existing application during installation; the executable and command line for that are stored in registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\XYZ_5.0] "UninstallString"="\"C:\\Windows\\XYZ\\uninstall.exe\" \"/U:C:\\Program Files\\XYZ\\irunin.xml\"" I search for it like this in the .wxs file: <Property Id='BPMUNINSTALLER'> <RegistrySearch Id='XYZUninstaller' Root='HKLM' Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\XYZ_5.0' Name='UninstallString' Type='raw' /> </Property> ... and then I use it like this: <CustomAction Id="UninstallOldBPM" ExeCommand="[BPMUNINSTALLER]" /> <InstallExecuteSequence> <Custom Action='UninstallOldBPM' After="InstallFinalize" /> </InstallExecuteSequence> However when I actually run it I get the following: Action ended 20:13:53: InstallFinalize. Return value 1. MSI (s) (E8:84) [20:13:53:948]: Doing action: UninstallOldXYZ Action 20:13:53: UninstallOldXYZ. Action start 20:13:53: UninstallOldXYZ. MSI (s) (E8:84) [20:13:53:950]: Note: 1: 2721 2: UninstallOldXYZ DEBUG: Error 2721: Custom action UninstallOldXYZ not found in Binary table stream The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2721. The arguments are: UninstallOldXYZ, , MSI (s) (E8:84) [20:13:55:393]: Product: XYZ -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2721. The arguments are: UninstallOldXYZ, , Action ended 20:13:55: UninstallOldXYZ. Return value 3. Action ended 20:13:55: INSTALL. Return value 3. ... So I think I'm missing something that should be obvious. I don't actually want to run a binary in the MSI - I effectively just want to run a command-line. Is there a recommended way of doing this? I had a look at the docs for CustomAction but didn't see anything obvious. TIA for any help. Yours, Duncan Bayne ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users