How do I make a WiX installer with a completely self-contained .NET 3.5 sp1 installer?(如何使用完全独立的 .NET 3.5 sp1 安装程序制作 WiX 安装程序?)
问题描述
我需要将完整的 .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 教程指出:
<Target Name="AfterBuild">
<GenerateBootstrapper ApplicationFile="$(TargetFileName)"
ApplicationName="My Application Name"
BootstrapperItems="@(BootstrapperFile)"
ComponentsLocation="Relative"
CopyComponents="True"
OutputPath="$(OutputPath)"
Path="C:Program FilesMicrosoft SDKsWindowsv6.0ABootstrapper"/>
</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 FilesMicrosoft SDKsWindowsv6.0ABootstrapper
.$(cddir)
变量是您编写安装 CD 内容的文件夹.
In your case, the $(bootstrapperPackagesFolder)
variable would point to C:Program FilesMicrosoft SDKsWindowsv6.0ABootstrapper
. 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.
我不确定我的示例是否与您已经在做的不同;也许您只是忘记在安装 CD 上包含 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?
这篇关于如何使用完全独立的 .NET 3.5 sp1 安装程序制作 WiX 安装程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何使用完全独立的 .NET 3.5 sp1 安装程序制作 W
基础教程推荐
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- rabbitmq 的 REST API 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 将 XML 转换为通用列表 2022-01-01