How do I make a WiX installer with a completely self-contained .NET 3.5 sp1 installer?

后端 未结 2 1530
無奈伤痛
無奈伤痛 2020-12-15 09:54

I need to include the full .NET 3.5 sp1 installer into my installer, which is in WiX.

I need that boostrapper to be entirely self contained, with no web access at al

相关标签:
2条回答
  • 2020-12-15 10:25

    You could checkout this Microsoft sample code, the thing is that WiX does not provide a bootstrapper/chainer - that's not coming until WiX 3.5 as the "Burn" tool.

    I'm not sure what you're using in your original example, I'm assuming msbuild or something - which is not a WiX component.

    0 讨论(0)
  • 2020-12-15 10:37

    <Project ToolsVersion="3.5"
       xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    
        <ItemGroup>
            <BootstrapperFile Include="Microsoft.Net.Framework.3.5.SP1" >
               <ProductName>.NET Framework 3.5 SP1</ProductName>
            </BootstrapperFile>
            <BootstrapperFile Include="Microsoft.Windows.Installer.3.1" >
               <ProductName>Windows Installer 3.1</ProductName>
            </BootstrapperFile>
        </ItemGroup>
    
        <Target Name="setup">
            <GenerateBootstrapper
                ApplicationFile="myproduct.msi"
                ApplicationName="myproduct"
                BootstrapperItems="@(BootstrapperFile)"
                Path="$(bootstrapperPackagesFolder)"
                ComponentsLocation="Relative"
                OutputPath="$(cddir)"
                Culture="en"/>
        </Target>
    
    </Project>
    

    In your case, the $(bootstrapperPackagesFolder) variable would point to C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\. The $(cddir) variable is the folder where you compose the content of your installation CD.

    The GenerateBootStrapper task will not only generate a bootstrapper exe, but will also copy a DotNetFX35SP1 and a WindowsInstaller3_1 folder to the same location. During installation, the bootstrapper exe will look for those folders and use the files in there, rather than downloading them.

    I'm not sure if my example is different from what you are already doing; maybe you just forgot to include the DotNetFX35SP1 folder on the installation CD?

    0 讨论(0)
提交回复
热议问题