Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Files not overwritten during major upgrade


15 replies to this topic

vishalv

vishalv
  • Full Members
  • 39 posts

Posted 05 October 2006 - 15:26

Hi ,
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.
Regards,
vishal



Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 05 October 2006 - 16:13

Dynamic file linking is a big no no no no no for upgrades. The reason is that component GUIDs must be consistent across releases for upgrades to work correctly and dynamic file linking essentially creates new GUIDs on the fly. Here be plenty of dragons.

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.
Regards
-Stein Åsmul

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 05 October 2006 - 16:14

One more thing: if you don't need to patch, you can probably work around the whole problem by moving RemoveExistingProducts before InstallInitialize in the InstallExecute sequence. This will essentially wipe ou the existing install and reinstall the new one. This could save you a lot of time rather than trying to fix the dynamically created component referencing.
Regards
-Stein Åsmul

vishalv

vishalv
  • Full Members
  • 39 posts

Posted 06 October 2006 - 15:18

Hi Glytz,
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.

Regards,
vishal





Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 06 October 2006 - 17:31

Have you perhaps changed these files on this particular system? For example copied down new versions of the files? Windows installer will not replace data files (files without version information) if the create and modify dates differ.
Regards
-Stein Åsmul

vishalv

vishalv
  • Full Members
  • 39 posts

Posted 17 October 2006 - 14:07

Hi Glytz,
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.
Thanks,
Vishal

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 17 October 2006 - 22:18

Suggest you do the following to work around this:

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.
Regards
-Stein Åsmul

vishalv

vishalv
  • Full Members
  • 39 posts

Posted 18 October 2006 - 00:01

Hi,
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?

Thanks,
Vishal


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 18 October 2006 - 04:29

Are these files perhaps changed by the application at all? Or are they read-only?
Regards
-Stein Åsmul

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 October 2006 - 07:22

The problem apparently is that the existing files are not replaced. If you install to a new folder there are no existing files so you don't see the problem.
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.

vishalv

vishalv
  • Full Members
  • 39 posts

Posted 10 November 2006 - 19:59

Hi Stefan,
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.

Thanks,
Vishal


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 November 2006 - 11:47

QUOTE
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.

rbrinda

rbrinda
  • Full Members
  • 65 posts

Posted 01 December 2006 - 21:28

Hi Stein Åsmul,

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.

Thanks.
-rb

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 02 December 2006 - 12:45

I believe this is an option in the release view for either the configuration or the release entry. Essentially you can point to a previous MSI file and when the release is built installshield will work out the GUID synchronziation (if possible).
Regards
-Stein Åsmul

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 02 December 2006 - 16:19

The option is on the Advanced Settings dialog (the last before the Summary) in the release wizard and is called Patch Optimization. You can browse for the previous msi file.

MSIPackageDiff is in menu Tools > Difference or directy in the Programs menu in the Macrovision > InstallShield 12 Tools folder.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 03 December 2006 - 15:33

Sorry, I didn't have Installshield in front of me when answering earlier. Please note that if you have several previous releases of the MSI "in the wild" the synchronization can only be done for one of them. If you run into a situation where the product is unpatchable, try to change the absolute path of the installation folder (if you can).
Regards
-Stein Åsmul