I have created a WiX installation package for a large program. The install package includes the merge modules for the Visual C++ 9.0 files. I need to include the merge modules for a COM DLL. The installation runs just fine. The first time I run the program, though, something odd happens. The first time the COM DLL is called, the Windows install mechanism starts running. An installation dialog pops up out of the blue. It does whatever it needs to do for a little while, then it goes away and the program resumes its normal function. This only happens the very first first time the COM DLL that needs the Visual C++ merge modules, and once the installer is done the program continues running without incident. Why is this happening, and what can I do to prevent it? Here is the WiX code for the merge modules:
<DirectoryRef Id="TARGETDIR">
<Merge Id="VCRedistCRT" SourceFile="C:\Program Files\Common Files\Merge Modules\Microsoft_VC90_CRT_x86.msm" DiskId="1" Language="0"/>
<Merge Id="VCRedistATL" SourceFile="C:\Program Files\Common Files\Merge Modules\Microsoft_VC90_ATL_x86.msm" DiskId="1" Language="0"/>
<Merge Id="VCRedistMFC" SourceFile="C:\Program Files\Common Files\Merge Modules\Microsoft_VC90_MFC_x86.msm" DiskId="1" Language="0"/>
<Merge Id="VCRedistMFCLOC" SourceFile="C:\Program Files\Common Files\Merge Modules\Microsoft_VC90_MFCLOC_x86.msm" DiskId="1" Language="0"/>
<Merge Id="VCRedistOpenMP" SourceFile="C:\Program Files\Common Files\Merge Modules\Microsoft_VC90_OpenMP_x86.msm" DiskId="1" Language="0"/>
</DirectoryRef>
<Feature Id="VCRedistCRT" Title="Visual C++ 9.0 CRT Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VCRedistCRT"/>
</Feature>
<Feature Id="VCRedistATL" Title="Visual C++ 9.0 ATL Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VCRedistATL"/>
</Feature>
<Feature Id="VCRedistMFC" Title="Visual C++ 9.0 MFC Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VCRedistMFC"/>
</Feature>
<Feature Id="VCRedistMFCLOC" Title="Visual C++ 9.0 MFC LOC Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VCRedistMFCLOC"/>
</Feature>
<Feature Id="VCRedistOpenMP" Title="Visual C++ 9.0 Open MP Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VCRedistOpenMP"/>
</Feature>
If I had to guess, it looks like the Visual C++ libraries are being installed "on first use;" that is, the feature is not fully installed until someone uses it. I would think that would be impossible as the AllowAdvertise valuue is set to "no," but I'm not a WiX expert.