维克斯 - 安装先决条件和第三方应用程序 [英] WiX - Install Prerequisites and 3rd party applications

查看:309
本文介绍了维克斯 - 安装先决条件和第三方应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WiX的Windows安装程序为我的C#应用​​程序。一切正常,我能够安装和卸载应用程序。但我有几个先决条件和其他第三方应用程序,我想用我的应用程序安装



先决条件:




  1. 的Microsoft .NET Framework 4(x86和x64) - dotNetFx40_Full_x86_x64.exe

  2. SQL Server 2008 Express的

    1. SQLEXPR_x64_ENU.EXE

    2. SQLEXPR32_x86_ENU.EXE


  3. 的SQL Server Compact 3.5 SP2

    1. SSCERuntime-ENU.MSI

    2. SSCERuntime-ENU-x64.msi




第三方应用程序:




  1. TeamViewer - TeamViewer_Setup.exe



所以,当然我不是在寻找所有先决条件和第三方应用的完整的指导方针。我只需要你的乡亲对我究竟可以嵌入这些 exe文件 MSI 设置成为一部分搞清楚帮助我的威克斯安装。



此外,一些用于 64 有的为 86 ,所以应该有足够的能力来处理操作系统版本和体系结构。这将如何与WiX的完成。



我一直在寻找互联网上一段时间,并没有具体似乎是为我工作。



我要确保,如果这些应用程序不能再装软件还应该安装。随着,如果任何先决条件或第三方应用程序已经安装,则不能再次安装。



我想这可以使用一些WiX的工具完成,但我不能够得到HOWTO任何具体说明。



修改1



确定我已经得到了的Microsoft .NET Framework 4的安装(x86和x64),和我面临的是现在我无法安装 SQL问题Server精简3.5 SP2 。我做的事情逐一使事情变得更加清晰。在这里,在我分享我的代码,以便您的人可以查看:

 < XML版本=1.0编码= UTF-8>?; 
<维克斯的xmlns =htt​​p://schemas.microsoft.com/wix/2006/wi
的xmlns:UTIL =htt​​p://schemas.microsoft.com/wix/UtilExtension> ;
<软件包名称=引导程序版本=1.0.0.0制造商=比利
的UpgradeCode =4a2346e9-a126-43fb-a352-05a95623e0d4>
< BootstrapperApplicationRef n =WixStandardBootstrapperApplication.RtfLicense/>
<链与GT;

< PackageGroupRef n =Netfx4Full/>
< PackageGroupRef n =SQLExpressCE/>

<! - 安装程序 - >
< MsiPackage n =所有MyApplication的SourceFile =$(var.Installer.TargetPath)/>

< /链与GT;
< /包>

<片断>
<! - 检查.NET 4.0 - >
< UTIL:RegistrySearch根=HKLM
键=SOFTWARE\Microsoft\Net框架Setup\NDP\v4\Full
值=版本
变量提供=Netfx4FullVersion/>
< UTIL:RegistrySearch根=HKLM
键=SOFTWARE\Microsoft\Net框架Setup\NDP\v4\Full
值=版本
变量提供=Netfx4x64FullVersion
Win64中=YES/>

<! - 安装.NET 4.0 - >
< PackageGroup n =Netfx4Full>
< ExePackage n =Netfx4Full
显示名称=Microsoft .NET框架4.0
压缩=NO
缓存=是
PerMachine =是
永磁=是
协议=netfx4
命门=是
的SourceFile =。\prerequisites\dotNetFx40_Full_x86_x64.exe
InstallCommand =/被动/ norestart更新日志文件
DetectCondition =Netfx4FullVersion AND(NOT VersionNT64 OR Netfx4x64FullVersion)/>
< / PackageGroup>

<! - 安装SQL Server CE - >
< PackageGroup n =SQLExpressCE>
< MsiPackage
缓存=NO
压缩=NO
ForcePerMachine =是
永磁=是
命门=是的。
的SourceFile =\prerequisites\SSCERuntime-ENU.MSI
InstallCondition =NOT VersionNT64和SQLINSTANCE和SqlServerInstalled和SQLServer2008R2Installed/>
< MsiPackage
缓存=NO
压缩=NO
ForcePerMachine =是
永磁=是
命门=是的。
的SourceFile =\prerequisites\SSCERuntime-ENU-x64.msi
InstallCondition =VersionNT64 AND NOT SQLINSTANCE和SqlServerInstalled和SQLServer2008R2Installed/>
< / PackageGroup>

< /片断>
< /维克斯>

注意:上面的代码安装 .NET框架,它不安装的SQL Server Compact 3.5 SP2






修改-2



参照后汤姆布洛杰特我的回答已经达到了这一步,但我无法理解如何给安装命令为我的SQL埃克包,并同我的MSI软件包。我也通过这个答案 http://stackoverflow.com/a/19010097/1182021 先生。尼尔Sleightholm 但是这一个是 SQL 2012 ,我该怎么办与 SQL 2008服务器同样的事情 CE (的条件和步骤)

 < ; PackageGroup标识=SQLExpressCE> 
将; ExePackage
缓存=否
压缩=否
永磁=否
生命=是
InstallCommand = / QS / ACTION =安装/ IACCEPTSQLSERVERLICENSETERMS / BROWSERSVCSTARTUPTYPE =自动/ SQLSVCSTARTUPTYPE =自动/ FEATURES = SQL / INSTANCENAME = SQLEXPRESS / SQLSVCACCOUNT =安培; QUOT; NT AUTHORITY\Network服务与; QUOT; / SQLSYSADMINACCOUNTS =安培; QUOT; BUILTIN\管理员和放大器; QUOT; / AGTSVCACCOUNT =安培; QUOT; NT AUTHORITY\Network服务与; QUOT; / SECURITYMODE = SQL / SAPWD =安培; QUOT; wegamed&安培; QUOT;
的SourceFile =。\prerequisites\SQLEXPR32_x86_ENU.EXE
DownloadUrl =htt​​p://download.microsoft.com/download/D/1/8/D1869DEC-2638-4854-81B7- 0F37455F35EA / SQLEXPR_x86_ENU.exe
InstallCondition =NOT SQLServer2008R2Installed AND NOT SQLServerInstalled/>
将; ExePackage DetectCondition =VersionNT64
缓存=否
压缩=否
永磁=否
生命=是
InstallCommand =/ QS / ACTION =安装/ IACCEPTSQLSERVERLICENSETERMS / BROWSERSVCSTARTUPTYPE =自动/ SQLSVCSTARTUPTYPE =自动/ FEATURES = SQL / INSTANCENAME = SQLEXPRESS / SQLSVCACCOUNT =安培; QUOT; NT AUTHORITY\Network服务与; QUOT; / SQLSYSADMINACCOUNTS =安培; QUOT; BUILTIN\ADMINISTRATORS&安培; QUOT; / AGTSVCACCOUNT =安培; QUOT; NT AUTHORITY\Network服务与; QUOT; / SECURITYMODE = SQL / SAPWD =安培; QUOT; wegamed&安培; QUOT;
的SourceFile =。\prerequisites\SQLEXPR_x64_ENU.EXE
DownloadUrl =htt​​p://download.microsoft.com/download/D/1/8/D1869DEC-2638-4854-81B7- 0F37455F35EA / SQLEXPR_x86_ENU.exe
InstallCondition =NOT SQLServer2008R2Installed AND NOT SQLServerInstalled/>
< / PackageGroup>



不过,安装程序无法完成。我想这是因为安装命令,因为它工作到接受许可协议。


解决方案

请参阅构建WiX的3.7文档安装包捆绑。如果你正在使用的MSBuild,SharpDevelop的或Visual Studio(非高速),您可以使用WiX的引导程序的项目模板。如果您希望自己调用工具命令行工具,它们是蜡烛光,就像建立MSI文件。



查看WiX的3.7文档的如何:安装.NET Framework使用燃烧。注:维克斯提供了两个预先定义的软件包.NET 4.0,从Microsoft下载都在安装时。一个是全包,另一种是用于下载只需要在用户的系统上下载包。如果您不想让您的安装程序依赖于Internet访问,可以为你有你捆绑任意exe文件做写你自己的包。显然,维克斯源代码可以使用.NET 4.0安装包帮助,因为它有检测条件,安装命令和卸载命令你需要。



请参阅其他每个软件包的安装文件来找出你应该把什么纳入其检测条件,安装命令和卸载命令。并再次,你必须把一个下载网址在每一包或没有的选择。



SQL Server CE的



 < PackageGroup n =SQLExpressCE> 
<! - 每http://support.microsoft.com/kb/974247,在64位系统上的32位和64位软件包必须安装相同的版本。 - >
< MsiPackage
可见=是
缓存=NO
压缩=NO
ForcePerMachine =是
永磁=是的。
命门=是
的SourceFile =\prerequisites\SSCERuntime-ENU.MSI/>
< MsiPackage
可见=是
缓存=NO
压缩=NO
ForcePerMachine =是
永磁=是的。
命门=是
的SourceFile =\prerequisites\SSCERuntime-ENU-x64.msi
InstallCondition =VersionNT64/>
< / PackageGroup>



维克斯刻录疑难解答



刻录创建日志文件本身以及它运行的任何MsiPackages。检查您的%TEMP%文件夹。


I have a wix Windows Installer for my C# application. Things are working, I am able to install and uninstall the application. But I have few Prerequisites and other 3rd party applications that I want to install with my application.

Prerequisites:

  1. Microsoft .NET Framework 4 (x86 and x64) - dotNetFx40_Full_x86_x64.exe
  2. SQL Server 2008 Express

    1. SQLEXPR_x64_ENU.EXE
    2. SQLEXPR32_x86_ENU.EXE

  3. SQL Server Compact 3.5 SP2

    1. SSCERuntime-ENU.msi
    2. SSCERuntime-ENU-x64.msi

3rd Party Application:

  1. TeamViewer - TeamViewer_Setup.exe

So of-course I am not looking for complete guidelines for all the Prerequisites and 3rd party applications. I just need you folks help on figuring out on how exactly I can embed these exe and msi setups to be a part of my wix installation.

Also, some are for x64 and some are for x86, so it should be capable enough to handle the OS version and architecture. How will this be accomplished with wix.

I have been searching on internet for a while now and nothing concrete seems to be working for me.

I need to make sure that if these applications are not installed then the software should also not install. Along with that if any of the prerequisite or 3rd party application is already installed then it should not install again.

I guess this can be done using some wix tools but I am not able to get any concrete instructions on howto.

EDIT 1

Ok I have got the Microsoft .NET Framework 4 (x86 and x64) installed, and the problem which I am facing now is I am unable to install SQL Server Compact 3.5 SP2. I am doing things one by one to make things more clear to me. Here under I am sharing my code so that you people can review:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
   xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="Bootstrapper" Version="1.0.0.0" Manufacturer="Billy"
        UpgradeCode="4a2346e9-a126-43fb-a352-05a95623e0d4">
  <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
  <Chain>

    <PackageGroupRef Id="Netfx4Full"/>
    <PackageGroupRef Id="SQLExpressCE"/>

    <!-- Install Application -->
    <MsiPackage Id="MyApplication" SourceFile="$(var.Installer.TargetPath)"/>

  </Chain>
</Bundle>

<Fragment>
  <!-- Check for .NET 4.0 -->
  <util:RegistrySearch Root="HKLM"
                       Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
                       Value="Version"
                       Variable="Netfx4FullVersion" />
  <util:RegistrySearch Root="HKLM"
                       Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
                       Value="Version"
                       Variable="Netfx4x64FullVersion"
                       Win64="yes" />

  <!-- Install .NEt 4.0 -->
  <PackageGroup Id="Netfx4Full">
    <ExePackage Id="Netfx4Full"
                DisplayName="Microsoft .NET Framework 4.0"
                Compressed="no"
                Cache="yes"
                PerMachine="yes"
                Permanent="yes"
                Protocol="netfx4"
                Vital="yes"
                SourceFile=".\prerequisites\dotNetFx40_Full_x86_x64.exe"
                InstallCommand="/passive /norestart"
                DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" />
  </PackageGroup>

  <!-- Install SQL Server CE -->
  <PackageGroup Id="SQLExpressCE">
    <MsiPackage
              Cache="no"
              Compressed="no"
              ForcePerMachine="yes"
              Permanent="yes"
              Vital="yes"
              SourceFile=".\prerequisites\SSCERuntime-ENU.msi"
              InstallCondition="NOT VersionNT64 AND SqlInstance AND SqlServerInstalled AND SQLServer2008R2Installed" />
    <MsiPackage
              Cache="no"
              Compressed="no"
              ForcePerMachine="yes"
              Permanent="yes"
              Vital="yes"
              SourceFile=".\prerequisites\SSCERuntime-ENU-x64.msi"
              InstallCondition="VersionNT64 AND NOT SqlInstance AND SqlServerInstalled AND SQLServer2008R2Installed" />
  </PackageGroup>

</Fragment>
</Wix>

NOTE: The above code installs .NET Framework, its not installing SQL Server Compact 3.5 SP2


EDIT -2

After Referring Tom Blodget answer I have reached to this far, however I am unable to understand how to give the Install Command for my SQL Exe package and same for my MSI package. I have also gone through this answer http://stackoverflow.com/a/19010097/1182021 of Mr. Neil Sleightholm but this one is for SQL 2012, how can I do this same thing with SQL 2008 Server and CE (The conditions and steps)

<PackageGroup Id="SQLExpressCE">
  <ExePackage
            Cache="no"
            Compressed="no"
            Permanent="no"
            Vital="yes"
            InstallCommand="/QS /ACTION=Install /IACCEPTSQLSERVERLICENSETERMS /BROWSERSVCSTARTUPTYPE=Automatic /SQLSVCSTARTUPTYPE=Automatic /FEATURES=SQL /INSTANCENAME=SQLEXPRESS /SQLSVCACCOUNT=&quot;NT AUTHORITY\Network Service&quot; /SQLSYSADMINACCOUNTS=&quot;BUILTIN\ADMINISTRATORS&quot; /AGTSVCACCOUNT=&quot;NT AUTHORITY\Network Service&quot; /SECURITYMODE=SQL /SAPWD=&quot;wegamed&quot;"
            SourceFile=".\prerequisites\SQLEXPR32_x86_ENU.EXE"
            DownloadUrl="http://download.microsoft.com/download/D/1/8/D1869DEC-2638-4854-81B7-0F37455F35EA/SQLEXPR_x86_ENU.exe"
            InstallCondition="NOT SQLServer2008R2Installed AND NOT SQLServerInstalled" />
  <ExePackage DetectCondition="VersionNT64"
            Cache="no"
            Compressed="no"
            Permanent="no"
            Vital="yes"
            InstallCommand="/QS /ACTION=Install /IACCEPTSQLSERVERLICENSETERMS /BROWSERSVCSTARTUPTYPE=Automatic /SQLSVCSTARTUPTYPE=Automatic /FEATURES=SQL /INSTANCENAME=SQLEXPRESS /SQLSVCACCOUNT=&quot;NT AUTHORITY\Network Service&quot; /SQLSYSADMINACCOUNTS=&quot;BUILTIN\ADMINISTRATORS&quot; /AGTSVCACCOUNT=&quot;NT AUTHORITY\Network Service&quot; /SECURITYMODE=SQL /SAPWD=&quot;wegamed&quot;"
            SourceFile=".\prerequisites\SQLEXPR_x64_ENU.EXE"
            DownloadUrl="http://download.microsoft.com/download/D/1/8/D1869DEC-2638-4854-81B7-0F37455F35EA/SQLEXPR_x86_ENU.exe"
            InstallCondition="NOT SQLServer2008R2Installed AND NOT SQLServerInstalled" />
</PackageGroup>

But Setup is unable to complete. I guess it is because of the install commands as it works till accept licence agreement.

解决方案

See the WiX 3.7 docs on "Building Installation Package Bundles". If you are using MSBuild, SharpDevelop or Visual Studio (non-Express), you can use the WiX Bootstrapper project template. If you prefer to call the toolset command-line tools yourself, they are candle and light, just like for building MSI files.

See the WiX 3.7 docs on "How To: Install the .NET Framework Using Burn". Note: WiX offers two pre-defined packages for .NET 4.0, both download from Microsoft at install-time. One is the full package, the other is the downloader package that downloads just is needed on the user's system. If you'd rather not have your installer depend on Internet access, you can write your own package as you have to do with any arbitrary exe that you bundle. Obviously, the WiX source code can help with the .NET 4.0 packages as it has the detect condition, install command, and uninstall command that you'd need.

See the installation docs for each of the other packages to find out what you should put into their detect conditions, install commands, and uninstall commands. And, again, you'd have the choice of putting a download URL in each package or not.

SQL Server CE

<PackageGroup Id="SQLExpressCE">
    <!-- Per http://support.microsoft.com/kb/974247, on a 64-bit system both 32-bit and 64-bit packages must be installed and be the same version. -->
    <MsiPackage
          Visible="yes"
          Cache="no"
          Compressed="no"
          ForcePerMachine="yes"
          Permanent="yes"
          Vital="yes"
          SourceFile=".\prerequisites\SSCERuntime-ENU.msi" />
    <MsiPackage
          Visible="yes"
          Cache="no"
          Compressed="no"
          ForcePerMachine="yes"
          Permanent="yes"
          Vital="yes"
          SourceFile=".\prerequisites\SSCERuntime-ENU-x64.msi"
          InstallCondition="VersionNT64" />
</PackageGroup>

WiX Burn Troubleshooting

Burn creates a log file for itself as well as any MsiPackages it runs. Check your %TEMP% folder.

这篇关于维克斯 - 安装先决条件和第三方应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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