Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 5

Key file not changed - but component gets updated anyway - Why?

Dear all!

I'm really confused about key-files and updating rules...

I just did the following:

- Created a new Basic MSI-Project within InstallShield 2009
- Created a Component with two text-files A and B
- Defined file A as key file
- Created build 1.0
- Installed build 1.0

After that i did this:
- Changed the content of file B (did NOT change key file A)
- Created an automatic upgrade item
- Created build 1.1 (as expected i get the following validation error: Val0004: The file 'B.txt' in component 'AllOtherFiles' is different from the file in the previous package, but the key file for this component did not change. As a result, the changed file will not get installed...)
- Installed build 1.1

Now here's what i expect after the installation of build 1.1:
File B should not have been replaced as the key file A of its component has not changed (exactly as the validation error said).

BUT: File B is overwritten!!

Within the log file (see attachment) i see the following, correct entry for FILE A:
Won't Overwrite;Won't patch;Existing file is unversioned and unmodified - hash matches source file

But, obviously MSI want to replace FILE B (but it shouldn't as far as i understand):
Overwrite;Won't patch;Existing file is unversioned and unmodified - hash doesn't match source file

Please help me! Am I doing something wrong creating the update 1.1?

Thanks a lot for your help!
Labels (1)
0 Kudos
(1) Reply
Level 10 Flexeran
Level 10 Flexeran

Unfortunately, VAL0004 incorrectly reports warnings/errors that it should not. The only cases that cause a component to not be reinstalled are as follows:
- The keyfile of the component in the new package has a lower version than the file already on the target machine.
- The keyfile of the component in the new package is unversioned and the existing file on the target machine is versioned.

All other cases will allow the component to reinstall (including if files in the component have changed but the keyfile has not).

Work order IOC-000074857 was submitted to correct the information reported by VAL0004 and will be resolved in a future release.

The runtime behavior that you are seeing is expected based on MSI component upgrade rules.
0 Kudos