更改或损坏的 msi [英] Changed or Corrupt msi

查看:15
本文介绍了更改或损坏的 msi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 wix 新手,请多多包涵.

I am new to wix so please bear with me.

我有一个适用于我们的 WPF Windows 应用程序的安装程序.我现在正在尝试在我的应用程序安装之前进行先决条件应用程序的安装.我可以构建与我的应用程序的先决条件打包在一起的安装程序,但是当我运行它并单击是"时,如果我想为我的先决条件程序运行安装,它会抛出错误.

I have a working installer for our WPF Windows application. I am now trying to make a prerequisite application install before my application installs. I am able build the installer packaged with the prerequisite for my application but when I run it and click "yes" to if I want to run the install for my prerequisite program it throws and error.

安装程序检测到文件C:UsersDevMachineAppDataLocalTempVSDC06D.tmpSlimDXSlimDX Runtime .NET 4.0 x64 (January 2012).msi"自最初发布以来已发生更改或可能已损坏.

Setup has detected that the file 'C:UsersDevMachineAppDataLocalTempVSDC06D.tmpSlimDXSlimDX Runtime .NET 4.0 x64 (January 2012).msi' has either changed since it was initially published or may be corrupt.

我知道 slimDx msi 没有损坏,因为我可以从我的安装程序目录运行它.所以也许它认为它已经改变了.

I know the slimDx msi is not corrupt as I can run it from my installer directory just fine. So maybe it thinks it has changed.

我在我的应用程序中的所有项目上都使用带有 .snk 密钥的代码签名,这可能是原因吗?如果这是问题,我不知道如何解决它.

I use code signing with a .snk key on all the projects in my application, could this somehow be the cause? I am at a loss on how to fix it if this is the problem.

我将可再发行的 slimDx 包复制到 msbuild 部分的 Setup 文件夹中.

I copy the redistributable slimDx package to the Setup folder in the msbuild part.

  <ItemGroup>
    <BootstrapperFile Include=".NETFramework,Version=v4.0">
      <ProductName>Microsoft .NET Framework 4.0</ProductName>
    </BootstrapperFile>
    <BootstrapperFile Include="Microsoft.Windows.Installer.4.5">
      <ProductName>Windows Installer 4.5</ProductName>
    </BootstrapperFile>
    <BootstrapperFile Include="ESRIArcEngine$(EsriVersionLinked)Runtime">
      <ProductName>ESRIArcEngine$(EsriVersionLinked)Runtime</ProductName>
    </BootstrapperFile>
    <BootstrapperFile Include="SlimDX.January.2012">
      <ProductName>SlimDX (January 2012)</ProductName>
    </BootstrapperFile>
  </ItemGroup>

所以最后我尝试在启动我的应用程序 Setup.exe 时实现它,它将首先运行 SlimDx 可再发行组件的安装程序,然后运行我的应用程序的安装程序.

So in the end I am trying to make it when I launch my applications Setup.exe it will first run the installer for SlimDx redistributable and then run the install for my application.

请帮忙,谢谢.

推荐答案

Downloaded From The Internet Flag?:只是为了确保,当您检查文件属性时SlimDX Runtime .NET 4.0 x64 (January 2012).msi 是否设置了从 Internet 下载"标志?

我不这么认为,但需要验证.我认为 MSI 的测试运行可能会删除该标志,但您可能在未删除该标志的情况下制作了下载文件的副本,这是包含在包中的副本(不是您运行的 MSI):

I wouldn't think so, but need to verify. I think a test run of the MSI might remove the flag, but it is possible that you have made a copy of the downloaded file without removing the flag and that is the copy that gets included in the package (not the MSI you ran):

  • 当从 Internet 下载该文件时,该文件将具有一个备用数据流 Zone.Identifier,其值为 3,表明该文件是从 Internet 下载的.这会触发安全警告.
  • 在您的情况下,只需使用文件属性对话框中指示的按钮手动删除标志,然后重新编译您的设置和启动器.
  • When downloaded from the internet the file will have an alternate data stream Zone.Identifier with a value of 3 indicating that the file was downloaded from the Internet. This triggers security warnings.
  • In your case just remove the flag manually using the indicated button in the file property dialog and then recompile your setups and launcer.

更多关于此备用流的信息:如何通过 Windows Defender SmartScreen 保护?

More on this alternate stream here: How to pass the Windows Defender SmartScreen Protection?

签名:您如何实际签署您的Setup.exe 和各种组件/先决条件?有关签名的一些信息:snk 与代码签名证书(推荐).

Signing: How do you actually sign your Setup.exe and the various components / prerequisities? Some info about signing: snk vs. code signing certificate (recommended).

还有一个问题,即 Setup.exe 需要 SHA1 哈希,并且安装程序使用 SHA2 哈希 进行签名:"文件有..当您在 Visual Studio 2010 和具有自定义先决条件的 .NET Framework 4.5 中发布 ClickOnce 应用程序时,出现.已更改...或可能已损坏"错误

And there is the issue where the Setup.exe expects SHA1 hashing and the setup is signed with SHA2 hashing: "File has... changed... or may be corrupt" error when you publish a ClickOnce application in Visual Studio 2010 and the .NET Framework 4.5 with custom prerequisites

Extract:...出现此问题是因为构建过程使用 SHA2 哈希生成了先决条件文件的摘要打包必备文件时的算法.但是,Setup.exe文件尝试使用 SHA1 算法读取摘要.所以,预期摘要和实际摘要之间出现不匹配,并且 Setup.exe 确定 .msi 文件丢失或已损坏."

<小时>

安全软件:虽然我认为这在这种情况下无关紧要,但可以验证任何安全软件没有阻止您的安装(无论出于何种原因).尝试暂时禁用它,或者在没有安装任何其他东西的干净虚拟机上进行测试?


Security Software: And although I think it irrellevant in this case, maybe verify that any security software isn't blocking your installation (for whatever reason). Try to disable it temporarily, or test on a clean virtual without anything else installed?

一些链接:

这篇关于更改或损坏的 msi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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