wix-toolset-configSkill wix-toolset-config

WiX工具集配置技能,用于自动化生成和配置Windows平台的MSI安装程序包。该技能支持定义产品信息、组件结构、注册表项、服务、升级逻辑和自定义操作,是软件打包、部署和DevOps流程中的关键工具。关键词:WiX, MSI, Windows安装程序, 软件打包, 部署自动化, DevOps, 安装包制作。

DevOps 0 次安装 0 次浏览 更新于 2/25/2026

name: wix-toolset-config description: 为Windows MSI安装程序配置WiX工具集 allowed-tools: Read, Write, Edit, Bash, Glob, Grep tags: [windows, wix, msi, installer, packaging]

wix-toolset-config

配置WiX工具集,以创建具有正确组件结构和功能的Windows MSI安装程序。

能力

  • 生成WiX源文件(.wxs)
  • 配置产品和包信息
  • 设置组件和功能
  • 配置注册表项
  • 设置服务
  • 处理升级
  • 配置自定义操作

输入模式

{
  "type": "object",
  "properties": {
    "projectPath": { "type": "string" },
    "productName": { "type": "string" },
    "version": { "type": "string" },
    "manufacturer": { "type": "string" },
    "upgradeCode": { "type": "string" }
  },
  "required": ["projectPath", "productName", "version"]
}

WiX示例

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*"
           Name="我的应用程序"
           Version="1.0.0.0"
           Manufacturer="我的公司"
           Language="1033"
           UpgradeCode="PUT-GUID-HERE">

    <Package InstallerVersion="200"
             Compressed="yes"
             InstallScope="perMachine"/>

    <MajorUpgrade DowngradeErrorMessage="已安装更新版本。"/>

    <MediaTemplate EmbedCab="yes"/>

    <Feature Id="ProductFeature" Title="我的应用程序" Level="1">
      <ComponentGroupRef Id="ProductComponents"/>
    </Feature>
  </Product>

  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLFOLDER" Name="MyApplication"/>
      </Directory>
    </Directory>
  </Fragment>

  <Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
      <Component Id="MainExecutable">
        <File Source="$(var.SourceDir)\MyApp.exe"/>
      </Component>
    </ComponentGroup>
  </Fragment>
</Wix>

相关技能

  • nsis-installer-generator
  • msix-package-generator