1

According to URLs I referenced, I understand that the Windows Installer uses key files to compare the version, date, and language of components and determine whether to update the component on target machine.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa368599%28v=vs.85%29.aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa371221%28v=vs.85%29.aspx

I also understand that default versining rules consist of 4 different cases as listed below.

  • Both Files Have a Version
  • Neither File Has a Version
  • Neither File Has a Version with File Hash Check
  • One File Has a Version

What I don't understand is that how does the installer determine whether the component needs to be updated if neither components has a key file?

And what's going to happen if neither components has a key file, but a file on the target computer indicates that its Modified date is later than the Create date? In this case, even when both products have a version, are they going to be considered as having Non-versioned files because no key file is set to components? How does the installer determine whether to install?

Any answers would be really appreciated,

fairyberry
  • 1,125
  • 1
  • 11
  • 13

1 Answers1

3

Every component from the installer must have a key member, this is imposed by Windows Installer to build a valid MSI package. Also, Microsoft strongly recommends that you create independent components for each DLL, EXE, OCX and hlp/help file. This will allow the file versioning rules to be correctly applied.

Bogdan Mitrache
  • 10,536
  • 19
  • 34
  • 3
    That's not entirely true. The Component KeyPath column is nullable and in this situation the directory of the component is the key path. In that situation the component is always reinstalled and InstallFiles will follow the default file versioning rules for each companion file in the component. – Christopher Painter Sep 18 '13 at 11:21
  • thanks Christopher, you are right, I forgot about that case. http://msdn.microsoft.com/en-us/library/windows/desktop/aa368007(v=vs.85).aspx – Bogdan Mitrache Sep 18 '13 at 11:57