问题
I have several files failed to update in windows installer patch. They are dynamic link files, with file hash changes, but the MsiFileHash table “File_" has changed for each file, below is the same file in MisFileHash table: RTM fileA:_A0FB2DAA62D356E1B64EA457014BA886 0 543212956 662074909 -1730111711 -2096793600 Patch7 fileA: _490DC427E0D9E512E96D3E9BF2B317C7 0 -1371102532 -401194406 -232195904 525972747 Maybe this causes the update failure. So I ask, will any way to force the dynamic link component to update in patch? Thanks
回答1:
A common reason for this is that the patch broke the component rules (for example by removing a component). A verbose log of the patch install would say something about SELMGR and component removal not supported. The patch update would go into advertised mode and fail to update anything. It would be useful to post the verbose log anyway to see if there is an entry about file replacement and whether an attempt was made to replace it and what it said (and this won't be there if component rules were broken).
The other issue is more obscure but is likely to cause problems. The primary key of the MsiFileHash (File_ field) table has changed. This implies that other primary keys in the new MSI have also changed. This is relevant:
https://blogs.msdn.microsoft.com/windows_installer_team/2007/03/07/arbitrary-labels-used-as-primary-keys-must-not-be-changed-between-versions/
but the bottom line quote from there is what matters " It’s imperative that the primary keys are not changed between versions of the package. " and that's because the MSI is a relational database and changing keys in different versions of the product will lead to unpredictable effects.
There is no indication of what tool you are using to create the patch, but most of them don't typically cause either of these issues because they build the patch taking account of the structure of the RTM and the rebuilt MSI file.
来源:https://stackoverflow.com/questions/36215121/how-to-force-a-file-update-in-patch-dynamic-link-unversioned