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

components with dynamic file links


5 replies to this topic

DeusApprime

DeusApprime
  • Members
  • 73 posts

Posted 19 October 2004 - 12:07

Hi all,
There is something that really bugs me, and I can't find an answer. I know that, when I create a component with dynamic file links (including subdirs), ISDEV creates a component for each sub dir at build time. Each such component holds the files in that subdir only.

So basically, if I were to manually create my own component for each subdir, it would be the same as what ISDEV does, except of course, the fact that the GUIDs of my components don't change from build to build, while ISDEV's component GUIDs do change.

However, I witness the following difference between the auto and manual approach:

When the component is created automatically, the files on the target machine are NOT OVERWRITTEN DURING MINOR UPGRADE.
When the components are created manually, the files are overwritten.

Example:
I have a directory with .txt files (including subdirs).
I create a setup package by the auto approach.
I install it, and I see all the .txt files correctly on the target box.
Now I modify some .txt files on the DEV BOX (not the target box) and rebuild the package.
I upgrade the current installation and non of the modified .txt files get installed.

I do the exact same thing, only this time, I manually create a component for each directory with .txt files, and the modified .txt files get installed correctly.

What is going on??? Does the GUID difference affect the results, or is there something else?

Thanks...

/=/=/=/=/=[br]Deus[br]/=/=/=/=/=

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 October 2004 - 10:55

As you noticed, adding subfolders using dynamic link changes the component GUID with each build. This is not allowed in a minor update, and therefore your update fials 8silently, without displaying an error message). Create a log of the update and you should see SELMGR warnings.

DeusApprime

DeusApprime
  • Members
  • 73 posts

Posted 21 October 2004 - 14:38

Thanks Stefan.
I've been investigating this further, and again encountered the same problem, but this time - using the MANUAL approach. Here are the details:

I did exacly what I described earlier: manually created a component for each subfolder (to prevent any GUID changes). Only this time, I put all these components in a seperate .msm file (instead of directly into the main installation project). I included the .msm file in the main setup and launched it the same way as before. This time, however, the files did not get overwritten. I even switched from dynamic link to normal file references - didn't help. The only difference I could see was the fact that this time, the components were a part of a merge module instead of the main setup.

And idea what is causing the problem this time???
Thanks...

Edited by DeusApprime, 21 October 2004 - 14:47.

/=/=/=/=/=[br]Deus[br]/=/=/=/=/=

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 October 2004 - 13:15

The first time install and the update both used the same merge module (only with updated file versions, no added/removed componentens or files, not changed component GUIDs)?
Did you make sure one of the files is marked as key path of the component, and that this file is updated?

DeusApprime

DeusApprime
  • Members
  • 73 posts

Posted 24 October 2004 - 15:07

Hi Stefan, thanks for your answer.
Apparently, the problem was something else:
1. The files DID get installed, only to the wrong location (bad merge module target location)
2. My MSI registry was unclean for some reason, which caused Setup to "skip" the components in the merge module - I'm not sure why though. As soon as I cleaned the registry that described the components of my merge module, everything got installed correctly. For clarification: the registry was there although the product wasn't installed (probably from a previous faulty install, terminated process, etc, I dunno). I later uninstalled and re-installed, just to make sure all is ok, and it seems to be working now.

Although I don't like such happy endings (I prefer the ones I also know the story that preceeds them...), I won't pursue it any further at the moment because of a tight schedule.
/=/=/=/=/=[br]Deus[br]/=/=/=/=/=

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 25 October 2004 - 04:37

Some things to remember:

* Dynamically created components will almost always cause problems during upgrades. And this is particulary the case during minor upgrades and any kind of patches. The underlying cause is that the component guids change for files with the same install location and file names. This is WRONG WRONG WRONG. And Installshield should warn developers better about this problem. What you can do is to use the "Patch optimization" setting to synchronize GUID's between releases. In the future use ONLY static components for any project that must be patched or upgraded (which is indeed most products).

* Text files with different create date and modify date will NOT be overwritten by windows installer, because they are seen as changed user data. To overwrite these files you can either use companion files, or force a complete reinstall by using an a in the REINSTALLMODE property.

Edited by Glytzhkof, 25 October 2004 - 04:38.

Regards
-Stein Åsmul