Windows 安装程序 XML (WiX)
我的应用程序需要 .Net Framework 3.5、Crystal Report 10.5 和 SQLServer Express 2005 作为先决条件。为此,我创建了一个 wix 安装项目并添加了 msbuild 任务作为先决条件。 我目前的问题 将套件安装到用户计算机时,Crystal Report 尝试安装 .net Framework 3.5 之前的版本。 如何更改先决条件的顺序?
我当前的 msbuild 任务代码如下;
<ItemGroup>
<BootstrapperFile Include="Microsoft.Net.Framework.3.5">
<ProductName>.NET Framework 3.5</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Windows.Installer.3.1">
<ProductName>Windows Installer 3.1</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="BusinessObjects.CrystalReports.10.5">
<ProductName>Crystal Reports Basic for Visual Studio 2008 (x86, x64)</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Sql.Server.Express.9.2">
<ProductName>SQL Server 2005 Express Edition SP2 (x86)</ProductName>
</BootstrapperFile>
<Target Name="AfterBuild">
<GenerateBootstrapper ApplicationFile="$(TargetFileName)"
ApplicationName="Business Software"
BootstrapperItems="@(BootstrapperFile)"
ComponentsLocation="Relative"
CopyComponents="True"
OutputPath="$(OutputPath)\en-us\"
Path="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\" />
My application needs .Net Framework 3.5, Crystal Report 10.5 and SQLServer Express 2005 as pre-requisites. For this purpose I created a wix setup project and added the msbuild task for prerequisites.
My current problem
When installing the kit to an user machine, crystal report trying to install before .net framework 3.5.
How can I change the order of the prerequisites?
My current msbuild task code is given below;
<ItemGroup>
<BootstrapperFile Include="Microsoft.Net.Framework.3.5">
<ProductName>.NET Framework 3.5</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Windows.Installer.3.1">
<ProductName>Windows Installer 3.1</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="BusinessObjects.CrystalReports.10.5">
<ProductName>Crystal Reports Basic for Visual Studio 2008 (x86, x64)</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Sql.Server.Express.9.2">
<ProductName>SQL Server 2005 Express Edition SP2 (x86)</ProductName>
</BootstrapperFile>
<Target Name="AfterBuild">
<GenerateBootstrapper ApplicationFile="$(TargetFileName)"
ApplicationName="Business Software"
BootstrapperItems="@(BootstrapperFile)"
ComponentsLocation="Relative"
CopyComponents="True"
OutputPath="$(OutputPath)\en-us\"
Path="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\" />
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通过替换 CrystalReports10_5\products.xml 中的 DependsOnProduct 标记可以解决此问题,如下所示
This problem is rectified by replacing the DependsOnProduct tag in CrystalReports10_5\products.xml as follows
尝试使用 dotnetinstaller。
它是一个免费工具,使用 dotnetinstaller 的好处是您可以将您的 msi 与其合并,并生成一个可由管理员执行的 exe,这与 msi 文件不同。
在 dotnetinstaller 中,您可以定义先决条件等等。
Try using dotnetinstaller.
It is a free tool and the benefit of using dotnetinstaller is you can merge your msi with that and can generate an exe which can be executed an administrator unlike msi file.
In dotnetinstaller you can have pre-conditions defined and much more.