如何使用wix创建MSI安装程序?

时间:2019-12-26 05:43:12

标签: wix

我想使用wix创建一个msi安装文件。

I want to create these distributions as wix installation files.

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*" Name="SetupProject1" Language="1033" Version="1.0.0.0" Manufacturer="winitech"     UpgradeCode="5a410445-8d05-44f3-aa33-3662cf67060a">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate />
    <Feature Id="ProductFeature" Title="SetupProject1" Level="1">
      <ComponentGroupRef Id="ProductComponents" />
    </Feature>
  </Product>
  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLFOLDER" Name="SetupProject1" />
      </Directory>
    </Directory>
  </Fragment>
  <Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
      <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
      <!-- <Component Id="ProductComponent"> -->
      <!-- TODO: Insert files, registry keys, and other resources here. -->
      <!-- </Component> -->
    </ComponentGroup>
  </Fragment>
</Wix>

在子文件夹中还有一个名为Symbols的文件。

我认为我需要将其添加到componentGroup中,但是我不知道如何。

1 个答案:

答案 0 :(得分:0)

快速“教程” :一些正在使用的WiX示例的指针:

一些观察 :不包括所有构建文件:

  • 不包括.pdb files或其他用于调试的文件(Skeet)。
  • 请勿分发调试版本,不要以发布模式进行构建,也不要使用这些文件(除非您想在内部测试调试版本)。
  • XML文件通常应与XmlFile and XmlConfig elements一起安装。
相关问题