I have an out-in-the-wild install that has a duplicate for two components. The first component is a collection of files, the second component is a CreateFolder (with a util:Permissions).
In the current installer, I've corrected the dupe by creating a new guid for the CreateFolder component. The problem I'm having is on a major upgrade. I've sequenced the RemoveExistingProducts after InstallFinalize. In my case, I have components that backup existing configuration files during the install, and then custom actions that do some migration before InstallFinalize. If I sequence RemoveExistingProducts after, say, InstallValidate, I can't do this backup stuff, at least not easily. The problem arises that when RemoveExistingProducts runs, it correctly deletes the directory created by CreateFolder, since it's a GUID that no longer exists in the upgraded product's component list. I figured I could work around this by backing up the folder, and then renaming it in a custom action after RemoveExistingProducts. So, I did the following: <RemoveExistingProducts After="InstallFinalize" /> ... <Fragment> <DirectoryRef Id="service.dir"> <Directory Id="service.logs.backup.dir.2003" Name="logs-backup"> <Component Id="Service.Log.Upgrade.2003" KeyPath="yes" Guid="2982DEF2-7016-4b34-A10B-9B81BBC83024"> <CreateFolder> <util:PermissionEx .../> </CreateFolder> <CopyFile Id="BackupServiceLogs.2003" Delete="yes" SourceDirectory="service.logs.dir.2003" SourceName="*" DestinationDirectory="service.logs.backup.dir.2003"/> </Component> </Directory> </DirectoryRef> </Fragment> ... <CustomAction Id="RestoreLogDirectoryBackup.SetProperty" Property="RestoreLogDirectoryBackup" Value=""[SystemFolder]cmd.exe""/> <CustomAction Id="RestoreLogDirectoryBackup" Property="RestoreLogDirectoryBackup" ExeCommand="/c if not exist "[service.dir]logs" ren "[service.dir]logs-backup" "logs"" Execute="deferred" Return="ignore"/> <InstallExecuteSequence> <Custom Action="RestoreLogDirectoryBackup.SetProperty" After="RemoveExistingProducts"><![CDATA[PRE13APPFOUND <> ""]]></Custom> <Custom Action="RestoreLogDirectoryBackup" After="RestoreLogDirectoryBackup.SetProperty"><![CDATA[PRE13APPFOUND <> ""]]></Custom> <InstallExecuteSequence/> The custom action RestoreLogDirectoryBackup fails. It's correctly running after RemoveExistingProducts, but the log contains this: MSI (s) (8C:94) [15:38:06:534]: Doing action: RestoreLogDirectoryBackup.SetProperty Action 15:38:06: RestoreLogDirectoryBackup.SetProperty. Action start 15:38:06: RestoreLogDirectoryBackup.SetProperty. MSI (s) (8C:94) [15:38:06:534]: PROPERTY CHANGE: Adding RestoreLogDirectoryBackup property. Its value is '"C:\WINDOWS\system32\cmd.exe"'. Action ended 15:38:06: RestoreLogDirectoryBackup.SetProperty. Return value 1. MSI (s) (8C:94) [15:38:06:534]: Doing action: RestoreLogDirectoryBackup Action 15:38:06: RestoreLogDirectoryBackup. Action start 15:38:06: RestoreLogDirectoryBackup. MSI (s) (8C:94) [15:38:06:550]: Note: 1: 1721 2: RestoreLogDirectoryBackup 3: "C:\WINDOWS\system32\cmd.exe" 4: /c if not exist "C:\Foo\service\logs" ren "C:\Foo\service\logs-backup" "logs" Info 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: RestoreLogDirectoryBackup, location: "C:\WINDOWS\system32\cmd.exe", command: /c if not exist "C:\Foo\service\logs" ren "C:\Foo\service\logs-backup" "logs" Action ended 15:38:06: RestoreLogDirectoryBackup. Return value 1. The command line runs fine after the install if I do it by hand on a DOS cmd line. I'm guessing that I simply can't do this after the InstallFinalize. I've tried moving RemoveExistingProducts to before InstallFinalize, but this fails completely: Action start 13:28:44: RemoveExistingProducts. DEBUG: Error 2613: RemoveExistingProducts action sequenced incorrectly. Internal Error 2613. Action ended 13:28:44: RemoveExistingProducts. Return value 3. So, I'm stuck. Any ideas on how I can resolve this? -- View this message in context: http://www.nabble.com/RemoveExistingProducts-and-Duplicate-GUIDs-tp17655018p17655018.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users