Visual Studio WiX 和补丁

发布于 2024-10-21 00:05:12 字数 1275 浏览 9 评论 0原文

我尝试使用 Visual Studio 构建 WiX 补丁。很容易。我使用 Visual Studio 构建,它也构建了。但是,当我尝试运行生成的 MSI 时,有人告诉我

此安装包无法 被打开。联系申请 供应商验证这是有效的 Windows 安装程序包。

理想情况下,我会创建一个更小的 msp 路径文件,但是,为了简单起见,我可以使用 MSI 文件。我如何使用 Visual Studio 执行此操作,或者我是否需要下拉到命令行并使用 Candle.exe、light.exe、torch.exe & pyro.exe?

WiX 代码如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Patch
          AllowRemoval="yes"
          Classification="Update"
          Comments="Some Patch for v 1.0.0"
          Description="Updates Some Software to v 1.0.1"
          DisplayName="Some software Patch 03/07/2011"
          Manufacturer="MyMfg"
          TargetProductName="SomeProduct">

        <Media Id="1000" Cabinet="Inspect.cab">
            <PatchBaseline Id="SomeBaseLine" />
        </Media>
        <PatchFamily
              Id="SomeFamily"
              Version="1.0.1.0"
              ProductCode="<GUID>"
              Supersede="yes">

            <ComponentRef Id="ComponentsToPatch" />
        </PatchFamily>
    </Patch>
</Wix>

I tried to build a WiX patch with Visual Studio. Easy enough. I build with Visual Studio, and it builds. But, when I try to run the resulting MSI, I am told

This installation package could not
be opened. Contact the application
vendor to verify tat this is a valid
Windows Installer package.

Ideally, I would be creating a much smaller msp path file, but, for sake of simplicity, I am OK with an MSI file. How do I do this with Visual Studio, or, do I need to drop down to the command line and use candle.exe, light.exe, torch.exe & pyro.exe?

The WiX code looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Patch
          AllowRemoval="yes"
          Classification="Update"
          Comments="Some Patch for v 1.0.0"
          Description="Updates Some Software to v 1.0.1"
          DisplayName="Some software Patch 03/07/2011"
          Manufacturer="MyMfg"
          TargetProductName="SomeProduct">

        <Media Id="1000" Cabinet="Inspect.cab">
            <PatchBaseline Id="SomeBaseLine" />
        </Media>
        <PatchFamily
              Id="SomeFamily"
              Version="1.0.1.0"
              ProductCode="<GUID>"
              Supersede="yes">

            <ComponentRef Id="ComponentsToPatch" />
        </PatchFamily>
    </Patch>
</Wix>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

水波映月 2024-10-28 00:05:12

Votive 没有补丁项目类型。 WiX MSBuild 目标包括 Torch 任务,但不包括 Pyro 任务,因此您可以使用 MSBuild 执行所有操作,但需要使用 Exec 运行 Pyro。有一个开放的功能请求来支持 Visual Studio 和 MSBuild 目标中的修补。

Votive doesn't have a patch project type. The WiX MSBuild targets include a Torch task but not a Pyro task, so you can do everything with MSBuild but need to use Exec to run Pyro. There's an open feature request to support patching, both within Visual Studio and the MSBuild targets.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文