我如何做一个WiX的安装程序具有完全独立的.NET 3.5 SP1安装程序? [英] How do I make a WiX installer with a completely self-contained .NET 3.5 sp1 installer?

查看:251
本文介绍了我如何做一个WiX的安装程序具有完全独立的.NET 3.5 SP1安装程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要包含完整的.NET 3.5 SP1安装到我的安装程序,这在WiX的。

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

我需要boostrapper是完全包含自我,没有网络接入的。它只是不允许此安装程序,要求网络;我们的客户在外蒙古(我是认真的,不只是利用这个地方的名字,因为它是远程的)给谁,我们的船的CD,因为他们没有上网的。

I need that boostrapper to be entirely self contained, with no web access at all. It is just not allowed for this installer to require the web; we have customers in outer Mongolia (I'm serious, not just using the place name because it's remote) to whom we ship CDs because they do not have internet access at all.

该WiX的教程中指出:

The WiX tutorial states:

<Target Name="AfterBuild">
    <GenerateBootstrapper ApplicationFile="$(TargetFileName)" 
                      ApplicationName="My Application Name"
                      BootstrapperItems="@(BootstrapperFile)"
                      ComponentsLocation="Relative"
                      CopyComponents="True"
                      OutputPath="$(OutputPath)"
                      Path="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\"/>
</Target>

以上引导程序需要的网页。我怎么做了一个不安装程序?

The above bootstrapper requires the web. How do I make an installer that does not?

推荐答案

<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>

在你的情况下, $(bootstrapperPackagesFolder)变量将指向C :\ Program Files文件\微软的SDK \的Windows \ v6.0A \引导程序\ 。该 $(cddir)变量是您撰写你的安装光盘的内容的文件夹。

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.

GenerateBootStrapper 任务不仅会生成一个引导程序的EXE,但也将复制 DotNetFX35SP1 WindowsInstaller3_1 文件夹复制到同一位置。在安装过程中,引导程序exe将查找这些文件夹,并使用那里的文件,而不是下载它们。

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.

我不知道如果我的例子是你已经在做不同的;也许你只是忘了,包括安装光盘上的 DotNetFX35SP1 文件夹?

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?

这篇关于我如何做一个WiX的安装程序具有完全独立的.NET 3.5 SP1安装程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆