If I had to guess, removing the fragment and making it part of the main file 
will fix it.  I normally make my checks inside the same fragment as the 
Package.  This way if you include the package in the chain you also include 
your searches and conditions.  I also use a separate file for each to have a 
nice clean separation, in which case from the main file referencing the Package 
or PackageGroup pulls it all into scope.

-----Original Message-----
From: StevenOgilvie [mailto:sogil...@msn.com] 
Sent: Tuesday, January 22, 2013 10:13 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Burn InstallCondition not working when it used to :(

Complete Bundle.wxs WITH .NET 4.0:
<?xml version="1.0" encoding="UTF-8"?>
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";
         xmlns:bal="http://schemas.microsoft.com/wix/BalExtension";
         xmlns:net="http://schemas.microsoft.com/wix/NetFxExtension";
         xmlns:util="http://schemas.microsoft.com/wix/UtilExtension";>
      <?include $(var.SolutionDir)Includes\Variables.wxi ?>
      <Bundle Name="$(var.ProductName)"
              Version="$(var.ProductVersion)"
              Manufacturer="$(var.ProductCompany)"
              UpgradeCode="some guid placed here"
              DisableModify="yes"
              DisableRemove="no"
              HelpTelephone="a number"
              HelpUrl="http://www.mycorp.com/support/index.php";
              Copyright="blah."
              IconSourceFile="$(var.resourcePath)\MyProduct.ico"
              SplashScreenSourceFile="$(var.resourcePath)\Side.bmp">
        <BootstrapperApplicationRef
Id="WixStandardBootstrapperApplication.HyperlinkLicense">
          <bal:WixStandardBootstrapperApplication
            SuppressOptionsUI="yes"
            LicenseUrl=""
            LogoFile="$(var.resourcePath)\logo.png"/>
        </BootstrapperApplicationRef>

        <Chain>
          <PackageGroupRef Id="Netfx4Full"/>

          <MsiPackage Id="A_Synchronizationx86"
                      DisplayName="Microsoft Sync Framework 2.1 Core Components 
(x86)"
                      DisplayInternalUI="no"
                      Visible="yes"
                     
SourceFile="..\PreReqs\Synchronization-v2.1-x86-ENU.msi"
                      Name="RedistTMC\Synchronization-v2.1-x86-ENU.msi"
                      Cache="no"
                      Compressed="no"
                      Permanent="yes"/>

          <MsiPackage Id="A_Synchronizationx64"
                      DisplayName="Microsoft Sync Framework 2.1 Core Components 
(x64)"
                      DisplayInternalUI="no"
                      Visible="yes"
                     
SourceFile="..\PreReqs\Synchronization-v2.1-x64-ENU.msi"
                      Name="RedistTMC\Synchronization-v2.1-x64-ENU.msi"
                      InstallCondition="VersionNT64"
                      Cache="no"
                      Compressed="no"
                      Permanent="yes"/>

          <MsiPackage Id="DatabaseProvidersx86"
                      DisplayName="Microsoft Sync Framework 3.1 Database 
Providers (x86)"
                      DisplayInternalUI="no"
                      Visible="yes"
                     
SourceFile="..\PreReqs\DatabaseProviders-v3.1-x86-ENU.msi"
                      Name="RedistTMC\DatabaseProviders-v3.1-x86-ENU.msi"
                      Cache="no"
                      Compressed="no"
                      Permanent="yes"
                      After="A_Synchronizationx86"/>

          <MsiPackage Id="DatabaseProvidersx64"
                      DisplayName="Microsoft Sync Framework 3.1 Database 
Providers (x64)"
                      DisplayInternalUI="no"
                      Visible="yes"
                     
SourceFile="..\PreReqs\DatabaseProviders-v3.1-x64-ENU.msi"
                      Name="RedistTMC\DatabaseProviders-v3.1-x64-ENU.msi"
                      InstallCondition="VersionNT64"
                      Cache="no"
                      Compressed="no"
                      Permanent="yes"
                      After="A_Synchronizationx64"/>

          <MsiPackage Id="SQLCompactx86"
                      DisplayName="Microsoft SQL Server Compact 3.5 SP2 (x86)"
                      DisplayInternalUI="no"
                      Visible="yes"
                      SourceFile="..\PreReqs\SSCERuntime_x86-ENU.msi"
                      Name="RedistTMC\SSCERuntime_x86-ENU.msi"
                      Cache="no"
                      Compressed="no"
                      Permanent="yes"/>

          <MsiPackage Id="SQLCompactx64"
                      DisplayName="Microsoft SQL Server Compact 3.5 SP2 (x64)"
                      DisplayInternalUI="no"
                      Visible="yes"
                      SourceFile="..\PreReqs\SSCERuntime_x64-ENU.msi"
                      Name="RedistTMC\SSCERuntime_x64-ENU.msi"
                      InstallCondition="VersionNT64"
                      Cache="no"
                      Compressed="no"
                      Permanent="yes"/>

          <MsiPackage Id="ServicesInstall_x86"
                      DisplayName="MyCorp Services x86"
                     
SourceFile="$(var.OutDir)MyCorp_Services_Setup_x86.msi"
                      Name="RedistTMC\MyCorp_Services_Setup_x86.msi"
                      InstallCondition="Not VersionNT64"
                      DisplayInternalUI="no"
                      Visible="no"
                      Cache="no"
                      Compressed="no"
                      Permanent="no">
            <MsiProperty Name="SERVER_INSTALL" Value="0"/>
          </MsiPackage>

          <MsiPackage Id="ServicesInstall_x64"
                      DisplayName="MyCorp Services x64"
                     
SourceFile="$(var.OutDir)MyCorp_Services_Setup_x64.msi"
                      Name="RedistTMC\MyCorp_Services_Setup_x64.msi"
                      InstallCondition="VersionNT64"
                      DisplayInternalUI="no"
                      Visible="no"
                      Cache="no"
                      Compressed="no"
                      Permanent="no">
            <MsiProperty Name="SERVER_INSTALL" Value="0"/>
          </MsiPackage>

          <MsiPackage Id="MainInstall"
                      DisplayName="$(var.ProductName)"
                     
SourceFile="$(var.OutDir)MyCorp_Message_Classification_Setup_x86.msi"
                     
Name="RedistTMC\MyCorp_Message_Classification_Setup_x86.msi"
                      InstallCondition="(Office2007InternetMail = 
&quot;Internet Mail&quot;) OR (Office2010Bitness = &quot;x86&quot;) OR 
(Office2013Bitness = &quot;x86&quot;) OR (Office2010Bitnessx64 =
&quot;x86&quot;) OR (Office2013Bitnessx64 = &quot;x86&quot;)"
                      DisplayInternalUI="yes"
                      Visible="no"
                      Cache="no"
                      Compressed="no"
                      Permanent="no"/>

          <MsiPackage Id="MainInstall_x64"
                      DisplayName="$(var.ProductName) x64"
                     
SourceFile="$(var.OutDir)MyCorp_Message_Classification_Setup_x64.msi"
                     
Name="RedistTMC\MyCorp_Message_Classification_Setup_x64.msi"
                      DisplayInternalUI="yes"
                      InstallCondition="(Office2010Bitness =
&quot;x64&quot;) OR (Office2013Bitness = &quot;x64&quot;) OR
(Office2010Bitnessx64 = &quot;x64&quot;) OR (Office2013Bitnessx64 =
&quot;x64&quot;) AND VersionNT64"
                      Visible="no"
                      Cache="no"
                      Compressed="no"
                      Permanent="no"
                      After="ServicesInstall_x64"/>
          </Chain>
      </Bundle>
      <Fragment Id="InstallConditionChecks">

        
        <WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" />
        <WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" />
        <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework 
Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" />
        <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework 
Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion"
Win64="yes" />

        <PackageGroup Id="Netfx4Full">
          <ExePackage Id="Netfx4Full"
                      DisplayName="Microsoft .NET Framework 4.0"
                      Cache="no"
                      Compressed="no"
                      PerMachine="yes"
                      Permanent="yes"
                      Vital="yes"
                      SourceFile="..\PreReqs\dotNetFx40_Full_x86_x64.exe"
                      Name="RedistTMC\dotNetFx40_Full_x86_x64.exe"
                      InstallCommand="/passive /norestart"
                      DetectCondition="Netfx4FullVersion AND (NOT
VersionNT64 OR Netfx4x64FullVersion)"/>
        </PackageGroup>

        
        <util:RegistrySearch
          Id="MSOfficeOutlook2007" Format="raw"
          Root="HKLM" Key="SOFTWARE\Microsoft\Office\12.0\Outlook"
Value="Internet Mail"
          Result="value" Variable="Office2007InternetMail"/>

        <util:RegistrySearch
          Id="MSOfficeOutlook2010" Format="raw"
          Root="HKLM" Key="SOFTWARE\Microsoft\Office\14.0\Outlook"
Value="Bitness"
          Result="value" Variable="Office2010Bitness"/>

        <util:RegistrySearch
          Id="MSOfficeOutlook2013" Format="raw"
          Root="HKLM" Key="SOFTWARE\Microsoft\Office\15.0\Outlook"
Value="Bitness"
          Result="value" Variable="Office2013Bitness"/>

        <util:RegistrySearch
          Id="MSOfficeOutlook2010x64" Format="raw"
          Root="HKLM" Key="SOFTWARE\Microsoft\Office\14.0\Outlook"
Value="Bitness" Win64="yes"
          Result="value" Variable="Office2010Bitnessx64"/>

        <util:RegistrySearch
          Id="MSOfficeOutlook2013x64" Format="raw"
          Root="HKLM" Key="SOFTWARE\Microsoft\Office\15.0\Outlook"
Value="Bitness" Win64="yes"
          Result="value" Variable="Office2013Bitnessx64"/>

      </Fragment>
    </Wix>


Without .NET 4.0:
<?xml version="1.0" encoding="UTF-8"?>
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";
         xmlns:bal="http://schemas.microsoft.com/wix/BalExtension";
         xmlns:util="http://schemas.microsoft.com/wix/UtilExtension";>
      <?include $(var.SolutionDir)Includes\Variables.wxi ?>
      <Bundle Name="$(var.ProductName)"
              Version="$(var.ProductVersion)"
              Manufacturer="$(var.ProductCompany)"
              UpgradeCode="some guid placed here"
              DisableModify="yes"
              DisableRemove="no"
              HelpTelephone="a number"
              HelpUrl="http://www.mycorp.com/support/index.php";
              Copyright="blah."
              IconSourceFile="$(var.resourcePath)\MyProduct.ico"
              SplashScreenSourceFile="$(var.resourcePath)\Side.bmp">
        <BootstrapperApplicationRef
Id="WixStandardBootstrapperApplication.HyperlinkLicense">
          <bal:WixStandardBootstrapperApplication
            SuppressOptionsUI="yes"
            LicenseUrl=""
            LogoFile="$(var.resourcePath)\logo.png"/>
        </BootstrapperApplicationRef>

        <Chain>
          <MsiPackage Id="A_Synchronizationx86"
                      DisplayName="Microsoft Sync Framework 2.1 Core Components 
(x86)"
                      DisplayInternalUI="no"
                      Visible="yes"
                     
SourceFile="..\PreReqs\Synchronization-v2.1-x86-ENU.msi"
                      Name="RedistTMC\Synchronization-v2.1-x86-ENU.msi"
                      Cache="no"
                      Compressed="no"
                      Permanent="yes"/>

          <MsiPackage Id="A_Synchronizationx64"
                      DisplayName="Microsoft Sync Framework 2.1 Core Components 
(x64)"
                      DisplayInternalUI="no"
                      Visible="yes"
                     
SourceFile="..\PreReqs\Synchronization-v2.1-x64-ENU.msi"
                      Name="RedistTMC\Synchronization-v2.1-x64-ENU.msi"
                      InstallCondition="VersionNT64"
                      Cache="no"
                      Compressed="no"
                      Permanent="yes"/>

          <MsiPackage Id="DatabaseProvidersx86"
                      DisplayName="Microsoft Sync Framework 3.1 Database 
Providers (x86)"
                      DisplayInternalUI="no"
                      Visible="yes"
                     
SourceFile="..\PreReqs\DatabaseProviders-v3.1-x86-ENU.msi"
                      Name="RedistTMC\DatabaseProviders-v3.1-x86-ENU.msi"
                      Cache="no"
                      Compressed="no"
                      Permanent="yes"
                      After="A_Synchronizationx86"/>

          <MsiPackage Id="DatabaseProvidersx64"
                      DisplayName="Microsoft Sync Framework 3.1 Database 
Providers (x64)"
                      DisplayInternalUI="no"
                      Visible="yes"
                     
SourceFile="..\PreReqs\DatabaseProviders-v3.1-x64-ENU.msi"
                      Name="RedistTMC\DatabaseProviders-v3.1-x64-ENU.msi"
                      InstallCondition="VersionNT64"
                      Cache="no"
                      Compressed="no"
                      Permanent="yes"
                      After="A_Synchronizationx64"/>

          <MsiPackage Id="SQLCompactx86"
                      DisplayName="Microsoft SQL Server Compact 3.5 SP2 (x86)"
                      DisplayInternalUI="no"
                      Visible="yes"
                      SourceFile="..\PreReqs\SSCERuntime_x86-ENU.msi"
                      Name="RedistTMC\SSCERuntime_x86-ENU.msi"
                      Cache="no"
                      Compressed="no"
                      Permanent="yes"/>

          <MsiPackage Id="SQLCompactx64"
                      DisplayName="Microsoft SQL Server Compact 3.5 SP2 (x64)"
                      DisplayInternalUI="no"
                      Visible="yes"
                      SourceFile="..\PreReqs\SSCERuntime_x64-ENU.msi"
                      Name="RedistTMC\SSCERuntime_x64-ENU.msi"
                      InstallCondition="VersionNT64"
                      Cache="no"
                      Compressed="no"
                      Permanent="yes"/>

          <MsiPackage Id="ServicesInstall_x86"
                      DisplayName="MyCorp Services x86"
                     
SourceFile="$(var.OutDir)MyCorp_Services_Setup_x86.msi"
                      Name="RedistTMC\MyCorp_Services_Setup_x86.msi"
                      InstallCondition="Not VersionNT64"
                      DisplayInternalUI="no"
                      Visible="no"
                      Cache="no"
                      Compressed="no"
                      Permanent="no">
            <MsiProperty Name="SERVER_INSTALL" Value="0"/>
          </MsiPackage>

          <MsiPackage Id="ServicesInstall_x64"
                      DisplayName="MyCorp Services x64"
                     
SourceFile="$(var.OutDir)MyCorp_Services_Setup_x64.msi"
                      Name="RedistTMC\MyCorp_Services_Setup_x64.msi"
                      InstallCondition="VersionNT64"
                      DisplayInternalUI="no"
                      Visible="no"
                      Cache="no"
                      Compressed="no"
                      Permanent="no">
            <MsiProperty Name="SERVER_INSTALL" Value="0"/>
          </MsiPackage>

          <MsiPackage Id="MainInstall"
                      DisplayName="$(var.ProductName)"
                     
SourceFile="$(var.OutDir)MyCorp_Message_Classification_Setup_x86.msi"
                     
Name="RedistTMC\MyCorp_Message_Classification_Setup_x86.msi"
                      InstallCondition="(Office2007InternetMail = 
&quot;Internet Mail&quot;) OR (Office2010Bitness = &quot;x86&quot;) OR 
(Office2013Bitness = &quot;x86&quot;) OR (Office2010Bitnessx64 =
&quot;x86&quot;) OR (Office2013Bitnessx64 = &quot;x86&quot;)"
                      DisplayInternalUI="yes"
                      Visible="no"
                      Cache="no"
                      Compressed="no"
                      Permanent="no"/>

          <MsiPackage Id="MainInstall_x64"
                      DisplayName="$(var.ProductName) x64"
                     
SourceFile="$(var.OutDir)MyCorp_Message_Classification_Setup_x64.msi"
                     
Name="RedistTMC\MyCorp_Message_Classification_Setup_x64.msi"
                      DisplayInternalUI="yes"
                      InstallCondition="(Office2010Bitness =
&quot;x64&quot;) OR (Office2013Bitness = &quot;x64&quot;) OR
(Office2010Bitnessx64 = &quot;x64&quot;) OR (Office2013Bitnessx64 =
&quot;x64&quot;) AND VersionNT64"
                      Visible="no"
                      Cache="no"
                      Compressed="no"
                      Permanent="no"
                      After="ServicesInstall_x64"/>
          </Chain>
      </Bundle>
      <Fragment Id="InstallConditionChecks">
        
        <util:RegistrySearch
          Id="MSOfficeOutlook2007" Format="raw"
          Root="HKLM" Key="SOFTWARE\Microsoft\Office\12.0\Outlook"
Value="Internet Mail"
          Result="value" Variable="Office2007InternetMail"/>

        <util:RegistrySearch
          Id="MSOfficeOutlook2010" Format="raw"
          Root="HKLM" Key="SOFTWARE\Microsoft\Office\14.0\Outlook"
Value="Bitness"
          Result="value" Variable="Office2010Bitness"/>

        <util:RegistrySearch
          Id="MSOfficeOutlook2013" Format="raw"
          Root="HKLM" Key="SOFTWARE\Microsoft\Office\15.0\Outlook"
Value="Bitness"
          Result="value" Variable="Office2013Bitness"/>

        <util:RegistrySearch
          Id="MSOfficeOutlook2010x64" Format="raw"
          Root="HKLM" Key="SOFTWARE\Microsoft\Office\14.0\Outlook"
Value="Bitness" Win64="yes"
          Result="value" Variable="Office2010Bitnessx64"/>

        <util:RegistrySearch
          Id="MSOfficeOutlook2013x64" Format="raw"
          Root="HKLM" Key="SOFTWARE\Microsoft\Office\15.0\Outlook"
Value="Bitness" Win64="yes"
          Result="value" Variable="Office2013Bitnessx64"/>

      </Fragment>
    </Wix>

Steve




--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Burn-InstallCondition-not-working-when-it-used-to-tp7583088p7583095.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, 
Windows 8 Apps, JavaScript and much more. Keep your skills current with 
LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. 
ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to