可能导致MSIExec错误1619“无法打开此安装包"的原因 [英] What can cause MSIExec Error 1619 'This installation package could not be opened'

查看:183
本文介绍了可能导致MSIExec错误1619“无法打开此安装包"的原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从一组示例程序中自动执行往返安装和一组MSI文件(由WiX生成)的卸载.由于某种原因,非常高兴地双击安装.MSI文件会生成:

I'm attempting to automate a roundtrip install and uninstall of a set of MSI files (generated by WiX) from a pack of sample programs. For some reason, a .MSI file that's perfectly happy to install on a double click generates:

无法打开此安装包.验证该软件包是否存在并且可以访问它,或者与应用程序供应商联系以确认这是有效的Windows Installer软件包.

This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.

当我以以下方式用MSIEXEC调用它时:

when I invoke it with MSIEXEC in the following manner:

<ItemGroup>
  <_SampleMsi Include="$(_ArtifactsPathAcceptanceSamples)\**\*.msi" />
</ItemGroup>
<Exec Command="$(WixDir)\smoke &quot;%(_SampleMsi.Identity)&quot;"/>
<!--Guarantee precondition even if cleanup didn't work-->
<Exec Command="msiexec -passive -norestart -x &quot;%(_SampleMsi.Identity)&quot;" IgnoreExitCode="true"  />
<Exec Command="msiexec -norestart -i &quot;%(_SampleMsi.Identity)&quot;"  />
<!--Uninstall of every sample should also always work-->
<Exec Command="msiexec -passive -norestart -x &quot;%(_SampleMsi.Identity)&quot;" />

当我尝试根据产品ID GUID卸载时,也会发生相同的问题:-

The same problem also happens when I try to uninstall based on the Product Id GUID:-

msiexec -passive -norestart -x FC7445BB-7E1D-4E36-A42A-CFA56263E453

有什么作用?

推荐答案

  1. 请勿直接接受消息的文本.关于所有您应该得出的结论是,misexec将命令的某些部分视为文件名,并且它没有加载并处理命令的完整性以使其满意.无论是因为路径太长,权限被拒绝还是由您的想象力限制的任何其他条件(大多数知识库文章似乎都与安装程序缓存问题有关,通常是基于GUID的语法或修补/升级)选项)

  1. Do not take the text of the message literally. About all you should be concluding is that misexec is treating some part of your command as a filename, and it didnt get to load and process the entirity of it to its satisfaction. Whether that's because the path was too long, permissions were refused, or any number of other conditions only limited by your imagination (most of the KB articles appear to pertain to Installer cache issues, which is generally the GUID-based syntax or patching/upgrading options)

您在GUID中缺少括号,傻瓜.我的意思是,即使msiexec /?不告诉您或不告诉您,您也知道GUID上有括号吗?!

You're missing the braces from the GUID, fool. I mean you did know there are braces on the GUID even if msiexec /? doesnt tell you or show you?!

即您需要将FC7445BB-7E1D-4E36-A42A-CFA56263E453替换为{FC7445BB-7E1D-4E36-A42A-CFA56263E453}

(我已经停止信任/读取输出,并考虑到GUID可能解析为msiexec不满意的缓存MSI,其原因与它似乎对安装语法不满意的原因相同,这就是全部这个领域的KB文章往往会谈论.)

(I had stopped trusting/reading the outputs and was considering it a possibility that the GUID was resolving to a cached MSI which msiexec was unhappy with for the same reason that it appeared to be unhappy with the installation syntax which is what all the KB articles in this space tend to talk about.)

您的路径包含相对跳转,尽管其净长度为< 160个字符,但总长度却大于160个字符,因此底层文件API令人窒息.人们喜欢写容易引起误解的通用错误消息.

Your path contains relative jumps which, despite having a net length of <160 chars, have an gross length >160 chars so the underlying file APIs are choking. People like writing generic error messages that are misleading.

您可以通过在使用的每个批处理表达式中用FullPath替换上面的Identity来解决此问题.

You can fix it by replacing Identity above with FullPath in each batching expression used.

另一种补救方法是使用WorkingDirectorymsiexecExec

Another way to remedy it is to use a WorkingDirectory with the Exec of msiexec

这篇关于可能导致MSIExec错误1619“无法打开此安装包"的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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