Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Patch Size

Created: 17 May 2010 • Updated: 26 Jun 2010 | 5 comments
This issue has been solved. See solution.

I'm up to my 5th patch to my main MSI. I noticed in the last patch and now this one that size of the patch file is going up enormously. Is this the way it should work? The files I am deploying are about 55MB and I use the option to deploy the whole file not just the binary changes. I only replace the same 20 or so files with each patch. Is there something I can do to stop this from happening? My latest patch is at 160MB. That's getting a little large for a download. Each patch is responsible for upgrading all previous patches so I extract each msi into the temp folder when I am creating the patch. Thanks in advance.

1st patch - 6MB
2nd patch - 24MB
3rd patch - 26MB
4th patch - 49MB
5th patch - 160MB

Comments 5 CommentsJump to latest comment

EdT's picture

Wise uses the Microsoft patch DLLs to create patches. These DLL files are updated in each release of the Microsoft windows installer SDK - if I recall correctly they are called something like patchwiz.dll and mspatchc.dll, and use the intermediate PCP file to create the patch.

As you dont mention which Wise tool you are using, all I can suggest is to grab the latest windows installer SDK and make sure your patch DLLs are the latest available.
You can also look in the SDK help file MSI.CHM  (also installed by Wise) for patching topics and techniques, so you can check if your PCP file content is optimised.

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

Tesaco's picture

Still trying to figure out the size issue with this patch. I am using WfWi v7.03. When I download and install the latest Windows Installer SDK (aka Windows 7 SDK). I copied all of the DLL's from "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin"  and pasted them into "C:\Program Files\Altiris\Wise Installation Studio\Windows Installer Editor " making sure to replace patchwiz.dll and mspatchc.dll. I opened my project and recompiled. Through the patch wizard, I select my newly compiled MSI and perform an admin install to extract it to a temp directory. After I get through the patch wizard I quickly get an error. In viewing the log file the last entry states... 

"SCHEMA Table: Upgraded Images has mismatched schema"

In reviewing the log file of a successfully built patch, it appears that every file in my installation is being flagged as a "SubFolder mismatch between upgrade" and the patch wizard is bundling up every file. Here's an example.


Using internal SQL cmd to create 'Patch' table.
Using internal SQL cmd to create 'PatchPackage' table.
Using internal SQL cmd to create 'MsiPatchHeaders' table.
 
WARNING (12): SubFolder mismatch between Upgraded ('SOURCEDIR\.:Progra~1|Program Files\TheFund|The Fund\DOUBLE~1|DoubleTime\America\ARGENT~1|Argentina\') and Target ('SOURCEDIR\.:Progra~1|Program Files\TheFund|The Fund\DOUBLE~4|DoubleTime\America\ARGENT~1|Argentina\') Images means old files may be orphaned.  File Table Key: Cordoba
 
(The above 'Warning' message is repeated 3 more times)
 
Patch API could not create a small patch; using whole upgraded file.
Including entire file: 'C:\DOCUME~1\KENADA~1\LOCALS~1\Temp\MSI116.tmp\.\Program Files\The Fund\DoubleTime\SQL Anywhere 11\Sun\JRE160_x86\lib\zi\America\Argentina\Cordoba';
FTK=Cordoba; temp location=BF454982\01349.FLE.
 

When I reviewed a log file from my previous patch, it only listed the files that were indeed different and it has different language. Example:

Using internal SQL cmd to create 'Patch' table.

Using internal SQL cmd to create 'PatchPackage' table.
Using internal SQL cmd to create 'MsiPatchHeaders' table.
 
Files differ: 'C:\DOCUME~1\user\LOCALS~1\Temp\MSI1FA.tmp\.\Program Files\The Fund\DoubleTime\acmshlp.chm',
                   'C:\DOCUME~1\user\LOCALS~1\Temp\MSI1E5.tmp\.\Program Files\The Fund\DoubleTime\acmshlp.chm'.
Files differ: 'C:\DOCUME~1\user\LOCALS~1\Temp\MSI1FA.tmp\.\Program Files\The Fund\DoubleTime\acmshlp.chm',
                   'C:\DOCUME~1\user\LOCALS~1\Temp\MSI1EC.tmp\.\Program Files\The Fund\DoubleTime\acmshlp.chm'.
    Patch API could not create a small patch; using whole upgraded file.
  Including entire file: 'C:\DOCUME~1\user\LOCALS~1\Temp\MSI1FA.tmp\.\Program Files\The Fund\DoubleTime\acmshlp.chm';
           FTK=acmshlp.chm; temp location=BF454982\01347.FLE.

Any idea why this latest patch is behaving differently? I try to change as little as possible between builds to avoid complications. I also noticed that when I recompile (with the old PatchWiz.dll v3.0.3790.371 and MsPatchC.dll v5.2.3760.0) and build the patch, which turn out to be 160MB, when I go back into 'Files' in the Wise GUI, all of my file sizes say 0KB. I then go and verify that the files are in the correct location, which they are. I tried to see if this had something to do with the MSIPatchHeader table. Something I read pointed in that direction but I don't see that table available through the WISE GUI. Maybe it's hidden??

Thanks for anyone's help or suggestion.

EdT's picture

The only thing that draws my attention is an apparent short filename mismatch, between DOUBLE~1 in one case and DOUBLE~4 in the other.  So either there were multiple instances of a folder starting with Doublexxxxxx, or there were multiple edits of your most recent MSI with quick compile turned on in the editor configuration (which is the default setting).

Just in case this is contributing to your issues, may I recommend that you check the two directory tables to see where the DOUBLE~4 is coming from, other whether it should be DOUBLE~1 to match the previous releases.

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

SOLUTION
Tesaco's picture

I noticed the short file name mismatch and searched the entire 'Tables' tab from the Wise GUI and Double~4 returned no results so I assumed this was something being generated during the patch creation. HOWEVER....I replaced DOUBLE~1 with DOUBLE~4 in the Directory table. Turned off 'Quick Compile'. Recompiled MSI. Rebuilt Patch. Viola! Back down to 50MB and the log file is grabbing the correct files labeling the entry 'Files Differ' instead of Subfolder Mismatch.

I guess this issue is resolved. If you have any idea of why I'm not able to put in the latest SDK DLL's, I would appreciate some suggestions. I noticed I posted the same thing regarding the latest SDK and receiving the mismatched schema message quite awhile back. I do all my work within VMware images. I've been burned too many times so I image, build, and test in the most sterile environments imaginable.

Thanks again, Ed

EdT's picture

The schema of an MSI describes the tables that are present, and also the definition of each table column (eg string, numeric) as well as the maximum lengths of entries that can be placed in each table column. Each windows installer release is accompanied by some schema changes, usually in the form of additional tables, so the nature of your error message about mismatched schema means one of two things.
Either the schema of the original MSI does not match the schema of the updated MSI that you are using to generate your patch, or the schema of all your MSIs in the sequence you are working with, no longer matches the schema requirements of the latest patch DLL files.
The windows installer SDK usually includes a schema directory for each schema release, so perhaps a little research in this area may yield some more answers.

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