如图所示,我利用Visual Studio 2015制作了一个小程序。基于.Net 4.0。用VS的Install扩展,新建Install项目进行打包。打包为.msi文件。该安装文件在已经安装了 .Net Framework4.0的情况下仍然出现这个问题,百思不得其解。

查阅了Stack Overflow的相关资料,得到了追踪故障源的方法——命令行安装.msi程序,可以看到log日志。即 msiexec /i a.msi /l*v a.log 将会生成名为“a.log”的日志。在日志中发现如下代码

=== 记录开始: 2016-8-26  21:49:10 ===
MSI (c) (84:68) [21:49:10:453]: Note: 1: 2262 2: PatchPackage 3: -2147287038
MSI (c) (84:68) [21:49:10:453]: Machine policy value 'DisableRollback' is 0
MSI (c) (84:68) [21:49:10:453]: User policy value 'DisableRollback' is 0
MSI (c) (84:68) [21:49:10:453]: PROPERTY CHANGE: Adding UILevel property. Its value is '5'.
MSI (c) (84:68) [21:49:10:453]: PROPERTY CHANGE: Adding ACTION property. Its value is 'INSTALL'.
MSI (c) (84:68) [21:49:10:453]: Doing action: INSTALL
MSI (c) (84:68) [21:49:10:453]: Note: 1: 2262 2: ActionText 3: -2147287038
操作 21:49:10: INSTALL.
操作开始 21:49:10: INSTALL。
MSI (c) (84:68) [21:49:10:453]: UI Sequence table 'InstallUISequence' is present and populated.
MSI (c) (84:68) [21:49:10:453]: Running UISequence
MSI (c) (84:68) [21:49:10:453]: PROPERTY CHANGE: Adding EXECUTEACTION property. Its value is 'INSTALL'.
MSI (c) (84:68) [21:49:10:453]: Doing action: DIRCA_CheckFX
操作 21:49:10: DIRCA_CheckFX.
操作开始 21:49:10: DIRCA_CheckFX。
MSI (c) (84:4C) [21:49:10:453]: Invoking remote custom action. DLL: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\MSI164.tmp, Entrypoint: CheckFX
MSI (c) (84:48) [21:49:10:453]: Cloaking enabled.
MSI (c) (84:48) [21:49:10:453]: Attempting to enable all disabled priveleges before calling Install on Server
MSI (c) (84:48) [21:49:10:453]: Connected to service for CA interface.
操作结束 21:49:10: DIRCA_CheckFX。返回值 3。
MSI (c) (84:68) [21:49:10:546]: Doing action: FatalErrorForm
操作 21:49:10: FatalErrorForm.
操作开始 21:49:10: FatalErrorForm。
MSI (c) (84:6C) [21:49:10:546]: Note: 1: 2262 2: Error 3: -2147287038
信息 2898。VSI_MS_Sans_Serif13.0_0_0, 宋体, 134
MSI (c) (84:6C) [21:49:10:546]: Note: 1: 2262 2: Error 3: -2147287038
信息 2898。VSI_MS_Sans_Serif16.0_1_0, 宋体, 134
MSI (c) (84:6C) [21:49:10:546]: Note: 1: 2262 2: Error 3: -2147287038
DEBUG: Error 2826:  Control Line2 on dialog FatalErrorForm extends beyond the boundaries of the dialog to the right by 3 pixels
安装程序在安装此软件包时遇到一个错误。这可能表示此软件包有错。错误码是 2826。参数是: FatalErrorForm, Line2, to the right
MSI (c) (84:6C) [21:49:10:546]: Note: 1: 2262 2: Error 3: -2147287038
DEBUG: Error 2826:  Control BannerBmp on dialog FatalErrorForm extends beyond the boundaries of the dialog to the right by 3 pixels
安装程序在安装此软件包时遇到一个错误。这可能表示此软件包有错。错误码是 2826。参数是: FatalErrorForm, BannerBmp, to the right
MSI (c) (84:6C) [21:49:10:546]: Note: 1: 2262 2: Error 3: -2147287038
信息 2898。VsdDefaultUIFont.524F4245_5254_5341_4C45_534153783400, 宋体, 134
MSI (c) (84:6C) [21:49:10:546]: Note: 1: 2262 2: Error 3: -2147287038
DEBUG: Error 2826:  Control Line1 on dialog FatalErrorForm extends beyond the boundaries of the dialog to the right by 3 pixels
安装程序在安装此软件包时遇到一个错误。这可能表示此软件包有错。错误码是 2826。参数是: FatalErrorForm, Line1, to the right
操作 21:49:10: FatalErrorForm. Dialog created
MSI (c) (84:6C) [21:49:10:625]: Note: 1: 2731 2: 0
操作结束 21:49:12: FatalErrorForm。返回值 1。
操作结束 21:49:12: INSTALL。返回值 3。

网友Aaron Stebner

aaarticlea/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4p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aTe6xd/ZrJc9C7E4CjPU12fi/SrfRvBUFpbDgXCl3I5dtpyTWUU2rnoVZxjUUOraNf4fEnwrCScnzH/8AQq6auZ+Hv/IqQf8AXR//AEKumroh8KPHxH8WXqwqC9tY7y1lglHyyIyZHUBhg4/Op6KoxvbU8hk/tXwVrEqxFD5ikK7JlZEz1+tJd65rXilodNZY3LSZVI0xk46k+g5r14gHqKAoB4ArL2fS+h3/AF5fE4Jy7mb4e0saNpENkJPMKZLN6sTk49q06KK0SscMpOTbZ//Z" alt="Avatar of Aaron Stebner" />

Aaron Stebner

Microsoft

MSFT

264,416 Points                11                6                5                       
Recent Achievements           
Proposed Answerer I                                            Ratings Board President                                            Forums Replies III                                                           
 
View Profile           

帖子里指出“返回值 3”往往与程序安装失败回滚有密切联系。

Open the verbose log in a text editor such as notepad and search for the string “return value 3”.  In nearly all cases, this takes me to the section in the verbose log that lists the action that failed that initially caused setup to rollback.

从我的a.log中可以看出DIRCA_CheckFX应该是问题的源头。在反复查看了目标机的安装环境(组策略、.net)之后,确定应该是安装包msi文件有问题。

查阅资料正好发现CsharpStyle兄的帖子【Setup Project】Windows XP 无法安装

里面提到

问题现象

使用 Visual Studio 2013 的 Setup Project 制作的 Windows Installer 在 Windows XP 上无法运行,通过以下方法获取日志:

  msiexec /i <msipath>setup.msi /l*v c:\temp\msi.log

通过查看日志的内容,发现以下错误:

  DIRCA_CHECKFX Return Value 3

问题原因

CHECKFX 的作用是检查 .NET Framework 版本,在 Setup Project 的设置中有两处:
1.Prerequisite
2.Launch Conditions 以上两处必须统一。 此外,更重要的问题是,Visual Studio 2013 生成的 Windows Installer 与 Windows XP 不兼容。 解决方法
1.Close Visual Studio 2013
2.Copy file with replace dpca.dll from C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\Deployment to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\VSI\bin
3.Open Project
4.Rebuild

无奈再安装VS2010还是太费劲,况且未必能解决2015的问题,遂另寻其他可能途径。最终在Github上找到了便捷方法:
Installation problem Windows XP帖子的讨论中,bh3605提到:

Find and download Orca. Use it to open up the msi file and look for two Actions. "DIRCA_CheckFx" and "VSDCA_VsdLaunchConditions". Delete them. You'll find them in tables InstallExecuteSequence and InstallUISequence. They're also in the CustomAction table, but I've found deleting them in just the execution sequence tables sufficed.

I don't know why it crashes on XP only, but I believe it's because XP doesn't have MSVBDPCA.dll. You can find more information on the Actions I mentioned here: http://stackoverflow.com/a/8613979

+1 for building something related to Pandora!

在网上查了好多帖子,都说msi安装包的DIRCA_CheckFX和VSDCA_VsdLaunchConditions这两个操作容易出问题。

也就是说,下载Ocra工具,然后删除"DIRCA_CheckFx"和"VSDCA_VsdLaunchConditions"这两个Action即可。
第一步,下载并打开Ocra工具中的Ocra.exe,如图

第二步,打开生成的(需要更改的)msi文件,找到CustomAction表,从表中找到两个Action

第三部,对这两个Action,分别右键,删除行,然后保存即可。安装就能成功安装了。

注意:修改完,打开记录追踪安装过程的话,还是存在有Error的问题。不过程序可以成功安装并正常运行。要想彻底解决还是要考虑替换dpca.dll文件或者等VSI小组更新(XP已经报废,这恐怕是痴心妄想)。替换dpca.dll不知道会不会有别的影响。

Stack Overflow的帖子DIRCA_CHECKFX Return Value 3 - VS 2013 Deployment Project中还有其他办法,比如

Here's what I did to workaround this issue for a 32-bit deployment project.

1.Build the setup project in VS2010 once. This package is not dogged by the issue but I didn't want to have to keep building in a different VS version.

2.Open the resulting msi with Orca, select the Binary table and export the content of MSVBDPCADLL to a file.

3.Now after you build it in VS2013 use Orca to import the exported data into Binary\MSVBDPCADLL to fix the package.

I have to do a similar thing with the 64-bit project but in this case it's to import the correct InstallUtil binary (being C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtilLib.dll).

网友分析,安装包出问题的原因为

The preview of the .vdproj resurrection uses DLLs that don't support Windows XP or Server 2003. Microsoft posted an update that might have fixed that bug.

唉~

希望各个单位早点淘汰古董XP!!!

解决msi文件在XP上安装未完成(提示安装程序被中断,未能安装app。需要重新启动该安装程序进行重试)的问题。的更多相关文章

  1. 解决msi文件在XP上安装未完成

    下载Ocra工具,然后删除"DIRCA_CheckFx"和"VSDCA_VsdLaunchConditions"这两个Action即可.第一步,下载并打开Ocr ...

  2. 完美解决 .txt文件在Mac上不能打开的问题

  3. 什么是MSI文件?

    当你双击`msi`文件时,就会调用`window.installer`程序,接下来就和安装其他程序一样了,但是你要确保你的`window.installer`服务是开启的,你可以在控制面板下的服务中找 ...

  4. MySQL之MySQL5.7安装包(msi文件)在Windows8下安装

    最近自己在使用MySQL5.7.16.msi安装MySQL.自己下载的是.msi文件,在安装的过程中遇到了许多文件,网上大部分的Blog都是关于免安装包的安装方法,希望我的方法对大家有帮助. 1,下载 ...

  5. 解决WordPress中无法将上传的文件移动至wp-content/uploads

    搭建lnmp环境,放一个wordpress建站系统 lnmp环境很快就搭建完成了,但是在放wordpress的时候出现了一些问题 最主要的问题: 1.第一个是wp-content/uploads没有权 ...

  6. 【MySQL】MySQL之MySQL5.7安装包(msi文件)在Windows8下安装

    最近自己在使用MySQL5.7.16.msi安装MySQL.自己下载的是.msi文件,在安装的过程中遇到了许多文件,网上大部分的Blog都是关于免安装包的安装方法,希望我的方法对大家有帮助. 1,下载 ...

  7. windows8.1下安装msi文件报错

    新安装了win8.1系统体验体验,可是安装msi文件的软件报internal error2502和2503错误,可以换一种安装方式. 不是直接点开安装,如图所示打开命令提示符: 使用msiexec / ...

  8. sql server 安装出现需要sqlncli.msi文件,错误为 microsoft sql server 2012 native client

    在安装sql server 2017 时出现 弹框标题为  microsoft sql server 2012 native client  内容为需要sqlncli.msi文件 去本地目录找本身的那 ...

  9. lr cc安装后提示“内部出现错误,无法创建文件夹”的解决办法

    好多人在使用lr过程中提示“内部出现错误,无法创建文件夹”,今天MacW小编给大家带来了解决的方法,一起来看看吧! 1.此问题主要是用户权限的问题. 下载这个shell 脚本,此 shell 脚本可自 ...

随机推荐

  1. 一眼看懂KMP匹配算法

    KMP算法——快速从字符串M(母串)中找出与字符串Z(子串)匹配的子串 例1: 0 1 2 3 4 5 M:a b c a b d Z:  a b d BF算法(最一般的算法,也叫“蛮力算法”): 将 ...

  2. vector algorithm find

    本来想着申请了博客园以后 我要写的博客都必须是有深度有内涵的...好吧 结果我只能说我想多了 还是得一步一步慢慢来 最近小学期的任务是要做一个学校食堂餐卡管理系统     有“严重拖延症”的我  果然 ...

  3. Android Build System

    归类一些Android build system 相关的知识. http://elinux.org/Android_Build_System make <local_module> - m ...

  4. byte数据的常用操作函数[转发]

    /// <summary> /// 本类提供了对byte数据的常用操作函数 /// </summary> public class ByteUtil { ','A','B',' ...

  5. people have been arrested under other offences instead.

    Homosexuality is not explicitly banned in Egypt but gay people have been arrested under other offenc ...

  6. Dapper学习笔记(2)-链接引用

    在研究Dapper源码时发现Dapper NET45类库中的SqlMapper.cs文件前面有个蓝色的箭头图标,发现在Dapper NET45文件夹下根本不存在SqlMapper.cs文件,其文件属性 ...

  7. red hat enterprise 6安装tftp服务

    1--->检查是否安装tftp rpm -qa tftp* 2--->安装tftp yum install -y tftp-server 3--->chkconfig --list| ...

  8. MySQL主从复制与读写分离

    MySQL主从复制(Master-Slave)与读写分离(MySQL-Proxy)实践 Mysql作为目前世界上使用最广泛的免费数据库,相信所有从事系统运维的工程师都一定接触过.但在实际的生产环境中, ...

  9. hosts.allow和hosts.deny

    /etc/hosts.allow和/etc/hosts.deny两个文件是控制远程访问设置的,通过他可以允许或者拒绝某个ip或者ip段的客户访问linux的某项服务. 比如SSH服务,我们通常只对管理 ...

  10. struts2 错误提示页面

    以前做的一个网站,最近服务器后台出现一些异常,问题是客户访问一个该网站下不存在的action,为了给客户一个友好的界面提示以及减小服务器端日志文件的内容.就在struts2下进行了如下配置: 在str ...