开发者

Wix: How to define conditional bootstrapper pre-requisites?

开发者 https://www.devze.com 2023-01-09 02:51 出处:网络
I am using WIX 3.0 Toolset and VS2008. In my \".wixproj\" file I have added the following code (which works fine). I want to add a condition so that it will only install PIA if office 2007 is installe

I am using WIX 3.0 Toolset and VS2008. In my ".wixproj" file I have added the following code (which works fine). I want to add a condition so that it will only install PIA if office 2007 is installed.

...
    <ItemGroup>
        <BootstrapperFile Include="Microsoft.Net.Framework.3.5">
          <ProductName>.NET Framework 3.5</ProductName>
        </BootstrapperFile>

        <!-- Here I want to check if office is installed. If true then install the PIAs -->    
        <BootstrapperFile Include="Microsoft.Office.PIARedist.2007">
          <ProductName>Microsoft Office 2007 Primary Interop Assemblies</ProductName>
        </BootstrapperFile>

      </ItemGroup>
     ...

I have the following code written in my installer script .wxs but this is not useful in the bootstrapper.

...
<!-- Properties to check for Word 2007 Version. Return string should be "Word.Application.12" -->
    <Property Id="WORDVERSION">
      <RegistrySearch Id="RegistrySearchWordVersion"
                      Roo开发者_开发技巧t="HKCR"
                      Key="Word.Application\CurVer"
                      Type="raw"/>
    </Property>
...


Similar to: WIX: GenerateBootStrapper conditions?

Check out the Product and Package Schema Reference and you probably want to look at the <BypassIf> and <InstallChecks> element.

0

精彩评论

暂无评论...
验证码 换一张
取 消