Personally I solved that in a test implementation with a PackageGroup
and a PackageGroupRef in main bundle.

PackageGroupRef
      <PackageGroupRef Id="VC2010SP1REDIST_X86"/>


The proper implementation relys on a file compare of the mfc100.dll in
SystemFolder as the old detection mechanisms (registry detection
ProductCode) frequently used for vcredist 2005 + 2008 cannot be used
here anymore. SPs are for 2010 deployed as major upgrade (and nomore
SxS). There checking the ProductCode from registry may lead to a wrong
result.

Read http://blogs.msdn.com/b/astebner/archive/2010/05/05/10008146.aspx
+ comments in context.

For the below implementation: Be aware: just a test implementation !

VCRedist.wxs
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension";>
  <Fragment>
    <util:FileSearch Id="MFC100_Version_x86"
Variable="MFC100_Version_x86" Path="[SystemFolder]\mfc100.dll"
Result="version"/>

    <PackageGroup Id="VC2010SP1REDIST_X86">
      <ExePackage Id="VC2010SP1REDIST_X86" Cache="no" Compressed="yes"
PerMachine="yes" Permanent="yes" Vital="yes"
SourceFile="vcredist_x86.exe"
                  InstallCommand="/quiet /norestart"
                  InstallCondition="(NOT MFC100_Version_x86 >=
v10.0.40219.1) OR NOT MFC100_Version_x86"
                  />
    </PackageGroup>
  </Fragment>
</Wix>

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to