Files not overwritten during major upgrade
Posted 05 October 2006 - 15:26
I have a strange problem. A few of the jar and jsp files are not being overwritten when a major upgrade is performed.
All these files are dyanmically linked and only a few files are being overwritten and few are not overwritten.
Is there any way that I can make all of the files to be overwritten on a major upgrade.
ANy help is appreciated.
Posted 05 October 2006 - 16:13
There is a feature in the GUI where you can point your new package to the previous MSI package. Installshield will then synchronize the GUIDs between the two releases. However, this won't help you if you have several public releases out since the GUIDs must be consistent across all releases. The real solution is to NEVER use dynamic file linking IF you ever need to upgrade a package (which you normally need to - so stop using dynamic linking altogether in my opinion).
Some important things to remember for upgrades (might not be too well written, short of time here):
* Component guids must be consistent across all releases. An absolute path must match a GUID, and only one GUID for each absolute path. Follow this religiously and your upgrades will be automagic.
* Only key paths for each component is checked to determine if the component is to be updated during the install. A component is either completely installed or not at all. Hence: all files in a component should change together. If you need to ensure they can be updated separately, use separate components.
* Following from the above: if you need to ensure that a component with multiple files are installed during an upgrade, make sure that the key file will trigger component install. There is also a "no soup for you" way to force complete reinstall. This is to set REINSTALLMODE=amus, but this will force overwrite all existing files regardless of version. NOT recommended.
Posted 05 October 2006 - 16:14
Posted 06 October 2006 - 15:18
Thanks for the quick response.
The scenario I mentioned dupes only in one of the PCs and not in other PCs.
In the same PC I performed a major upgrade with the setup installed in a directory other than the deafult directory and the upgrade went fine. However on retrying the same thing again the files were not replaced.
Is this the expected behaviour?Is there any link between the path where you install? Is there anything that I can do so that the upgrade goes fine in that PC?
I have tried stopping all the services and process which may use these files. Still no luck.
I am really stuck in here. Any help or pointers to make this upgrade working will be helpful.
Posted 06 October 2006 - 17:31
Posted 17 October 2006 - 14:07
The problem is not duping if I install the vesrion A in another path and upgrade it to path B. Now does the GUIDs that are created on the fly(for dynamically linked files hope i am right here) depend on the path where the product is installed.
I cannot even go back to remove the dynamic linking of files since I have around 8000 files that need to be installed.
When I do an upgrade from version A to B, the control panel entry for A was not being removed. However when I click on the change/remove button, it would disappear. So i had a piece of code written to delete the same. Could this hinder the upgrade?
Any help or suggestion is highly appreciated.
Posted 17 October 2006 - 22:18
1: Change the overall install folder. Change all static component GUIDs in the process
2: For each new build make sure you point to a pre-existing MSI to ensure Installshield matches up the dynamically created GUID's. This is what I ended up doing, and it works. Nothing beats static GUIDs though.
The overall idea of the above is to abandon the current state and "start fresh" - then you can do it right for the next release.
Posted 18 October 2006 - 00:01
I did a MSI diference and i do not get any changes in the component GUIDs.
Could you please specify what do you mean by "change the overall install folder". Does this mean that I have to reorganise the components?
Posted 18 October 2006 - 04:29
Posted 18 October 2006 - 07:22
A verbose log of the install should tell you why the files are not being overwritten (at least in a Basic MSI project), and moving the RemoveExistingProducts ation to an earlier position in the sequence (by selecting "remove previous version first" in the upgrade settings view) should also help.
HOWEVER - you are using InstallScript MSI. This project type is known to cause various problems, including upgrades. For instance there 's aknown problem documented at http://support.insta...ticleid=Q107649 "Major Upgrade Causes System Changes to Rollback".
I strongly recommend not to use the InstallScript MSI project type.
Posted 10 November 2006 - 19:59
Thanks for the reply. But am in no position to go back on the design as the setup has gone to the customers.
I have placed the RemoveExistingProducts CA between the InstallValidate and InstallFinalize. Can I place a custom action that can be used to delete these files? When I tried this I get an error.
I had placed the condition as UPGRADINGPRODUCTCODE.
This should ensure that the CA will be executed during a major upgrade only.
Is there any suggestion.
Posted 11 November 2006 - 11:47
|I have placed the RemoveExistingProducts CA between the InstallValidate and InstallFinalize.|
RemoiveExistingProducts is a Standard Action, not a Custom Action.
Try placing it between InstallValidate and InstallInitialize.
And my advice still applies: generate a verbose log.
Posted 01 December 2006 - 21:28
You have mentioned in your first response to this thread that there is a feature in Installshield GUI where you can synchronize GUIDs between multiple releases that used dynamic file linking. In what version of Installshield is this feature available and where exactly can I find it? I checked all menu options within Installshield 12 IDE and I can't seem to find this feature that lets GUID synchronization. I can't find it in MSIPackageDiff tool also. I'd appreciate if you could explain where I can find this option in the IDE.
Posted 02 December 2006 - 12:45
Posted 02 December 2006 - 16:19
MSIPackageDiff is in menu Tools > Difference or directy in the Programs menu in the Macrovision > InstallShield 12 Tools folder.
Posted 03 December 2006 - 15:33