locked
VC2008 SP1 -- vcredist vs. merge modules RRS feed

  • Question

  •  

    I've been deploying the VC runtime libraries using the merge modules, bundling them into my own MSI package. I did this for VC2005, VS2005SP1, and VC2008. The disk space cost was slightly higher than vcredist, but not enough to worry about. That changed with VC2008 SP1. vcredist grew from 2 MB to 4 MB (2 MB increase), but my MSI package is 8 MB larger [1]. The MSM files haven't grown that much. Where is the bloat coming from? A related question is, how did Microsoft build the MSI/CAB files embedded in vcredist? Clearly, it wasn't from the merge modules.

     

    --John

     

    [1] I'm using the X86 sizes, but the same unexplained bloat happened on X64 and IA64 too.

     

    Tuesday, March 3, 2009 4:44 PM

All replies

  • Sorry i am not able to recall the exact name of the file but it is either msimerge.exe or merge.exe to merge the cab file to your MSI package.

    Thanks
    Rupesh Shukla
    Tuesday, March 3, 2009 5:13 PM
  • Pintu Shukla said:

    You can use merge.exe to merge the cab file to your MSI package.


    What cab file?  You can't legally extract the cab from vcredist.  redist.txt is quite clear that vcredist*.exe can only be distributed in unmodified form.
    Tuesday, March 3, 2009 5:26 PM
  • I think i misunderstood your question .See you you want to merge a cab you can use above utility and if you want to extract a cab from a MSI try with msiexec with corresponding option.

    Thanks
    Rupesh Shukla
    Tuesday, March 3, 2009 5:33 PM
  • Pintu Shukla said:

    I think i misunderstood your question .See you you want to merge a cab you can use above utility and if you want to extract a cab from a MSI try with msiexec with corresponding option.



    I don't want to be rude, but I also need to be honest.  Honestly, I don't think you understand the question.  I have quite a bit of experience with Windows Installer, and have succesfully used the VC++ merge modules for several years.  Something changed in VC2008 SP1 to significantly increase the size.  I'm searching for information on this specific problem.
    Tuesday, March 3, 2009 7:02 PM
  • I am sorry if i misunderstand your question.See if it's a Package related question so you should try in Package and Deployment Forum .

    Thanks

    Rupesh Shukla
    Tuesday, March 3, 2009 8:40 PM
  • I use the same technique and haven't noticed anything grossly different with SP1. The msm files, vcredist and my package all contain the same files and the uncompressed size of the runtimes is about the same (the MFC DLL is variously included six times at ~3.5 MBytes each and is the major contributor to the size).

    Maybe your CAB files are not being compressed effectively for some reason.

    Have you tried compacting your package? I've found that dead space grows over time and sometimes I get a significant shrinkage when I compact.
    Tuesday, March 3, 2009 10:02 PM
  • I created a minimal installer with WiX 3.0.5020 to demonstrate the problem.  The XML is hand-crafted, and builds were run from the command line (not using WiX's Visual Studio integration).  With VC2008 RTM, the .MSI file is 3,635,200 bytes.  With VC2008 SP1, the .MSI file is 11,257,856 bytes.


    <?xml version="1.0" encoding="utf-8"?>  
     
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">  
     
        <Product Id="21112DAB-B6BB-4854-9E8D-6640182E365C" UpgradeCode="21112DAB-B6BB-4854-9E8D-6640182E365C" Name="Demonstrate VC2008SP1 bloat" Language="1033" Version="1.0.0.0" Manufacturer="Foo Bar and Grill">  
     
            <Package Description="Demonstrate VC2008SP1 bloat" Manufacturer="Foo Bar and Grill" InstallerVersion="300" Languages="1033" Platform="x86" Compressed="yes" /> 
     
            <Media Id="1" Cabinet="FooBar.cab" CompressionLevel="high" EmbedCab="yes" /> 
     
            <Property Id="ALLUSERS" Value="1" /> 
     
            <Directory Id="TARGETDIR" Name="SourceDir">  
     
                <Directory Id="ProgramFilesFolder" Name="PFiles">  
                    <Directory Id="INSTALLDIR" Name="VC2008SP1 bloat demo" FileSource=".">  
     
                        <Component Id="Main" Guid="0B1C28E2-D0B9-4385-8397-77D9C9413893">  
     
                            <File Id="test.exe" Name="test.exe" /> 
                            <File Id="test.exe.manifest" Name="test.exe.manifest" /> 
     
                        </Component> 
     
                    </Directory> 
                </Directory> 
     
                <Merge Id="CRT" SourceFile="..\msm\Microsoft_VC90_CRT_x86.msm" Language="1033" DiskId="1" /> 
                <Merge Id="ATL" SourceFile="..\msm\Microsoft_VC90_ATL_x86.msm" Language="1033" DiskId="1" /> 
                <Merge Id="MFC" SourceFile="..\msm\Microsoft_VC90_MFC_x86.msm" Language="1033" DiskId="1" /> 
                <Merge Id="MFCLOC" SourceFile="..\msm\Microsoft_VC90_MFCLOC_x86.msm" Language="1033" DiskId="1" /> 
     
                <Merge Id="CRT Policy" SourceFile="..\msm\policy_9_0_Microsoft_VC90_CRT_x86.msm" Language="1033" DiskId="1" /> 
                <Merge Id="ATL Policy" SourceFile="..\msm\policy_9_0_Microsoft_VC90_ATL_x86.msm" Language="1033" DiskId="1" /> 
                <Merge Id="MFC Policy" SourceFile="..\msm\policy_9_0_Microsoft_VC90_MFC_x86.msm" Language="1033" DiskId="1" /> 
                <Merge Id="MFCLOC Policy" SourceFile="..\msm\policy_9_0_Microsoft_VC90_MFCLOC_x86.msm" Language="1033" DiskId="1" /> 
     
            </Directory> 
     
            <Feature Id="All" Level="1">  
                <ComponentRef Id="Main" /> 
     
                <MergeRef Id="CRT" /> 
                <MergeRef Id="ATL" /> 
                <MergeRef Id="MFC" /> 
                <MergeRef Id="MFCLOC" /> 
                <MergeRef Id="CRT Policy" /> 
                <MergeRef Id="ATL Policy" /> 
                <MergeRef Id="MFC Policy" /> 
                <MergeRef Id="MFCLOC Policy" /> 
            </Feature> 
     
        </Product> 
     
    </Wix> 
     

    Wednesday, March 4, 2009 9:55 PM
  • I dug deaper and found that the MFC dlls have greatly increased in size in SP1 (from 1.1 to 3.6 MBytes). Since they account for most of the size of the package that accounts for the size increase. SP1 has the Feature Pack incorporated, so all that new ribbon eye candy must take a lot of code!
    Monday, March 9, 2009 11:07 PM
  • Jon Baggott said:

    I dug deaper and found that the MFC dlls have greatly increased in size in SP1 (from 1.1 to 3.6 MBytes). Since they account for most of the size of the package that accounts for the size increase. SP1 has the Feature Pack incorporated, so all that new ribbon eye candy must take a lot of code!


    I understand that the MFC DLL's are larger in SP1. I expected my MSI to increase in size because of it. What I don't understand is why my MSI increased so much more than vcredist. vcredist is just a wrapper around an MSI and CAB file. Microsoft was able to build a much smaller CAB than I can. Why?

    Wednesday, March 11, 2009 3:51 PM
  • MFC 9.0 (including CRT + localization) = 2,10 MB
    MFC 9.0 SP1 (including CRT + localization) = 4,94 MB
     
    Ok, so 2,84 MB "feature pack" stuff was added. Totally unacceptable, but let's ignore that for a minute...
     
    Let's try creating a simple project using the old vs the new merge modules:
     
    MSI_With_Old_MFC_MSM.msi = 5,34 MB
    MSI_With_New_MFC_MSM.msi = 14,0 MB
     
    Difference: 8,66 MB
     
    This means 5,82 MB garbage was added. Crazy!


    This is a nasty BUG. Period! Anybody knows how to fix the MSM?
    Thursday, January 14, 2010 2:56 PM