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

WHY does InstallValidate null my request


7 replies to this topic

daleq

daleq
  • Full Members
  • 9 posts

Posted 20 March 2007 - 04:48

Hi,

I'm building a patch for my product and have several files that are not getting updated.

This blog, http://blogs.msdn.co.../07/439810.aspx, gives some reasons why files may not be updated, but none of them apply to my case (as far as I can tell).

Is there a verbose log setting that tells WHY InstallValidate nulls out a request?

Here are the relevant parts of my verbose patch install log.
<snip>
1: 03/14/07 16:46:23 PostExecuteSequence for myProduct
1: 03/14/07 16:46:23 ATMODE=Install, REMOVE=
<snip>
MSI (s) (9C:4C) [15:21:40:040]: File = AeBRSserver.war: Final State = Install
<snip>
MSI (s) (9C:4C) [15:22:33:227]: Doing action: InstallValidate
<snip>
MSI (s) (9C:4C) [15:22:33:247]: Feature: AEBRS.Server; Installed: Local; Request: Reinstall; Action: Reinstall
<snip>
MSI (s) (9C:4C) [15:22:33:247]: Component: AEBRS.Server_WAR_AeBRSserver.war; Installed: Local;
Request: Null; Action: Null
<snip>
MSI (s) (9C:4C) [15:22:33:287]: Component: __AEBRS.Server_WAR_AeBRSserver.war65; Installed: Null; Request: Null; Action: Null
<snip>
MSI (s) (9C:4C) [15:22:56:320]: File = AeBRSserver.war: Final State = Install
<snip>


I noticed that these components did not have a KeyFile, so I added in the patch. This did not work. I then modified the cached .msi to add the KeyFiles, but still no luck.

Many thanks,
Dale

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 March 2007 - 16:49

If the key file is unchanged then the component will not be overwritten. If there's no key file, the folder becomes key. You can't set or change the key file in a (small or minor) update. Set the key file before oyu install the initial version, then your update should work.

daleq

daleq
  • Full Members
  • 9 posts

Posted 20 March 2007 - 18:09

Thanks for your reply Stefan.

I think my problem is due to the file location not being determined until after CostFinalize. My file is installed in Apache Tomcat folders and I don't determine that location until after FileCost. I'm thinking I need to move this to before CostInitialize.

I'm curious. If a folder is the component key, how does the msi engine determine if the component will be updated? I've not found any documentation on this.

Thanks again,
Dale

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 March 2007 - 19:06

I believe that typically it won't be updated if the folder exists.

nc4ted

nc4ted
  • Full Members
  • 8 posts

Posted 10 January 2008 - 01:27

Stefan,

That makes sense in a "REINSTALLMODE=vomus" kind of way.

But, if the folders are the keypaths, is there a way to force them to update/overwrite anyway? Isn't that what REINSTALLMODE controls?

I've tried that myself, but to no avail -- my requests are being nulled regardless.

Thanks

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 January 2008 - 12:30

I really don't know. If your tests show that it doesn't work with vamus for instance (which is a very dangerous option and not recommended!) then I guess it's not possible.

nc4ted

nc4ted
  • Full Members
  • 8 posts

Posted 12 January 2008 - 03:11

I've found a workaround, but it's rather inelegant. I "trick" the installer into upgrading by renaming the target directories to "dirname_temp".

The installer I'm working with was designed poorly. ALL program files are in one huge component. (And that component is within one feature). This obviously makes the upgrade process difficult.

Since no key files are specified (and therefore, the directories are the keypaths), the installer won't copy over the updated files it contains, if it sees that the directories already exist on the target machine. Once I rename the directories, the installer installs the new files, because it can't find any existing ones. Not brain surgery, right?

However, during this minor upgrade, the installer will only copy the root files, NOT subdirectories, of a given directory. For example, let's say directory A has subdirectory B, and files 1 and 2 after a first-run install. If I rename directory A to directory Z, then run the minor upgrade, only files 1 and 2 will be reinstalled, but not subdirectory B.

This is good behavior, for the most part. However, this "trick" is binary; I can only reinstall all files in a given directory or not. My question is, how can I get the "vomus" style of installation given this setup? In other words, how can I make this installer only install updated files in each directory? Is there maybe a way to control its behavior when dealing with keypaths, perhaps? My log output clearly shows "REINSTALL=ALL REINSTALLMODE=vomus IS_MINOR_UPGRADE=1".

Thanks in advance for your help

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 14 January 2008 - 14:22

QUOTE
My question is, how can I get the "vomus" style of installation given this setup? In other words, how can I make this installer only install updated files in each directory?
This only works for versioned files, and such files should each be in its own component and be the key file of that component.
It doesn't work for versionless files because Windows Installer doesn't use the file date of the file in the setup in the comparison.