Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

UpgradeSync and Patch Creation

Updated: 22 May 2010 | 3 comments
trailway's picture
0 0 Votes
Login to vote
This issue has been solved. See solution.

I want to build clean patches so I tried the following:

1) Open current version of my installer in the Wise Installer Editor
2) I run UpgradeSync
3) I select the previous version of my installer as an MSI file
4) I get a boatload of errors such as:

"Component 'xxx' exits in the previous version and the keypath does not
 exist in the current install. The component's contents will be deleted
 during an upgrade."

"A component with keypath 'xxx' exists in the previous install.  A new
 component must be added that matches this keypath and GUID."

FWIW, the components are largely generated by wildcard inclusion of .NET and COM
DLLs into features.

What I found is that if I modify step 3 such that I choose the previous
WSI file then these errors go away.  I do understand that WSI is a superset
of MSI but am somewhat confused by this behavior.

What I want to do next is to run the Patch Creation Wizard.  Should I try
to pick the previous WSI in that case as well?  I am thinking not because
what the user installed was the MSI and not the WSI.

Sorry for the newbie questions but I really want to get this right and would
love to benefit from the knowledge and experience of others.

Thanks in advance!

Comments

EdT's picture
14
Oct
2009
0 Votes 0
Login to vote

Wrong approach

First of all, WSI is mostly a subset (not superset) of MSI as it does not include the internal CAB streams, nor does it have a valid media table, as this only gets generated by a compile.

The normal sequence for creating a patch is.

1. Take original MSI
2. Modify it with the new content, but leave unchanged content as is
3. Run UpgradeSync to ensure that unchanged content retains the same component GUIDS.
4. Run patch wizard to extract the differences between the two MSI files into a patch.

By using wildcards in your installs, you are basically creating two entirely different MSIs, and consequently even identical files will end up in different components with different identities, thus making the UpgradeSync process report lots of different errors.

So to make your patch, you must get away from wildcarding your content, and modify your original MSI to retain unchanged content in an unmodified form, and just update the files that have changed.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

trailway's picture
19
Oct
2009
0 Votes 0
Login to vote

Thank you for your guidance. 

Thank you for your guidance.  I am a setup newbie who is inheriting an existing configuration management process and trying add support for patch builds.

I am sorry but I do not quite understand why using wildcards is like creating two entirely different MSIs.  I am in no way disputing your point but moving away from using wildcards is a big impact to the current CM process and I have to justify it.  Can you provide any additional insight? 

Most of the keys in the tables seem to line up well.  What does not line up well is the registry table entries because these use arbitrary labels:

http://blogs.msdn.com/windows_installer_team/archive/2007/03/07/arbitrary-labels-used-as-primary-keys-must-not-be-changed-between-versions.aspx

I was hoping that by specifying the Previous Version and/or using UpgradeSync was going to sort all of this out for me but alas that appears not to be the case.

If I stop using wildcards and add the files by hand then will the registry keys line up?

I appreciate your patience.  If you can suggest good resources for best-practices with regards to generating patches then I would appreciate it.

EdT's picture
19
Oct
2009
0 Votes 0
Login to vote

What is a patch

A patch is essentially a package of differences extracted by comparing two MSI files. In order for the differences to be correctly identified, each resource in the first MSI which remains unchanged in the new MSI must have identical properties. If we consider a component as a resource, each unchanged component in a new MSI must continue to have the same key path and the same GUID as in the original MSI.
The structure of the MSIs in terms of how components are grouped into features must also be consistent.

There is a help file called MSI.CHM which originates from the Microsoft Windows Installer SDK, but is also installed by the Wise application, that covers most of the topics arising from working with MSI technology. The SDK also covers patching should you wish to explore that in more detail.

By using Wildcards, you are effectively randomising the creation of each new MSI as content changes, and as a consequence, when you run UpgradeSync, you are getting lots of errors and inconsistencies reported because key paths are changing in components when they shouldn't be.

Why don't you try a small test application and create a patch for it using the "hand cranked" method, without using any wildcards, and see how you get on.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.