using WIX3.6 to install .NET Framework 3.5 SP1 with Burn

只谈情不闲聊 提交于 2019-11-30 10:01:27

It's unclear in your question where you are trying to do stuff so I'll just start from the beginning.

Create a new Wix burn bootstrapper project. This is where your dependencies will be installed and then your existing Wix 3.5 installer will be spawned from.

Download the .net 3.5 SP1 full package and take note of the direct url used to download it.

Using heat.exe (in the wix 3.6 bin dir) run the following command which will generate a WXS file with the details of the .net installer.

heat.exe payload [path_to_net_installer] -o [path_to_wxs]

this.will give you following in a wxs:

<RemotePayload CertificatePublicKey="F321408E7C51F8544B98E517D76A8334052E26E8"
               CertificateThumbprint="D57FAC60F1A8D34877AEB350E83F46F6EFC9E5F1" 
               Description=".NET Framework 3.5 Setup"
               Hash="3DCE66BAE0DD71284AC7A971BAED07030A186918" 
               ProductName=".NET Framework 3.5" 
               Size="242743296" 
               Version="3.5.30729.1" />

Add this into in your bootstrapper project as a child of an ExePackage element and update the element with your download url saved earlier. This will automatically download the .net installer or you can place it next to the bootstrapper exe and it will detect it.

Create a chain in the Bundle that contains the .net ExePackage and a MsiPackage for your installer. You will then end up with something like (a lot of the required attributes I'll leave you to fill in!):

 <Bundle Name="$(var.SkuName)"
         Copyright="$(var.Copyright)"
         Manufacturer="$(var.Manufacturer)"
         Version="$(var.ProductVersion)"
         UpgradeCode="$(var.UpgradeCode)">
     <Chain>
         <ExePackage Id="dotNetFX3.5">
             <RemotePayload />
         </ExePackage>
         <MsiPackage Id="MyMsi" />
     </Chain>
  </Bundle>

Build and you should then have a big exe with your msi included or if you choose to not compress it an exe that executes your msi (it will need to be in the same folder).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!