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

查看:261
本文介绍了更改或损坏的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:\ Users \ DevMachine \ AppData \ Local \ Temp \ VSDC06D.tmp \ SlimDX \ SlimDX Runtime .NET 4.0 x64(2012年1月).msi'自首​​次发布以来已更改或可能已损坏.

Setup has detected that the file 'C:\Users\DevMachine\AppData\Local\Temp\VSDC06D.tmp\SlimDX\SlimDX 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.

请帮助,谢谢.

推荐答案

是从Internet标志下载的吗? :只是为了确保您在检查文件属性时 SlimDX Runtime .NET 4.0 x64 (January 2012).msi 是否设置了"从互联网下载"标志?

我不这么认为,但需要进行验证.我认为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和各种components / prerequisities?有关签名的一些信息: 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

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

Extract: "...this problem occurs because the build process generates the prerequisite file’s digest by using the SHA2 hashing algorithm when it packages the prerequisite file. However, Setup.exe file tries to read the digest by using the SHA1 algorithm. Therefore, a mismatch occurs between the expected digests and the actual digests, and Setup.exe determines the .msi file to be either missing or corrupted."


安全软件 :尽管在这种情况下,我觉得它很反感,但还是可以验证是否有任何安全软件没有阻止您的安装(无论出于何种原因).尝试暂时禁用它,还是在没有安装任何其他工具的干净虚拟机上进行测试?


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?

某些链接 :

Some Links:

  • setup has detected that the file "" has changed since it was initially published
  • Installation of Bootstrapper Package may fail with the error: ‘Setup has detected that the file X has either changed since it was initially published or may be corrupt.’

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

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