Wix 安装程序在安装失败后执行程序并显示错误 2896 [英] Wix Installer Execute Program after installation failing with error 2896

查看:28
本文介绍了Wix 安装程序在安装失败后执行程序并显示错误 2896的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我查看了所有 SO 问题和一系列其他问题,但找不到答案.

I have looked at all the SO questions and a range of others, and cannot find the answer.

我有一个安装后要运行的可执行文件:

I have an executable to run after an installation:

<Property Id="WixShellExecTarget" Value="#filUpgrader" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="no" />

安装后总是运行(不需要复选框)

which is always run after installation (no checkbox needed)

<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">1</Publish>

我已经尝试了我能想到的所有选项来完成这项工作(它是在前一个化身中冒充).无论我做什么,它似乎都给了我这个:

I have tried every option I can think to make this work (it was impersonating in a previous incarnation). Whatever I do, it seems to give me this:

Action 14:30:46: LaunchApplication. 
Action start 14:30:46: LaunchApplication.
MSI (c) (38:0C) [14:30:47:026]: Invoking remote custom action. DLL: ***********\AppData\Local\Temp\MSI395.tmp, Entrypoint: WixShellExec
Action ended 14:30:47: LaunchApplication. Return value 3.
MSI (c) (38:E4) [14:30:47:111]: Note: 1: 2205 2:  3: Error 
MSI (c) (38:E4) [14:30:47:123]: Note: 1: 2228 2:  3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 2896 
DEBUG: Error 2896:  Executing action LaunchApplication failed.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2896. The arguments are: LaunchApplication, , 
Action ended 14:30:47: ExitDialog. Return value 3.

(我在本地文件路径上加了星号).我以为问题是它想要提升权限,但现在已经不是这样了.当我从安装目录运行应用程序时,它运行良好,不需要管理员权限或其他任何东西.

(I have starred out local file paths).I thought the problem was that it wanted elevated privileges, but that is not the case any more. When I run the app from the installed directory, it runs fine, without asking for admin permission or anything else.

这开始让我很恼火.我有另一个具有相同问题的安装,但这是其中更直接的一个.如果我能让这个工作,我应该能够解决另一个问题.但我开始对 Wix 失去信心.

This is starting to really annoy me. I have another installation with the same issue, but this is the more straightforward of them. If I can get this working, I should be able to sort the other one out. But I am starting to lose faith in Wix.

推荐答案

如果该值应该引用一个文件,则它需要放在方括号中,以便解析为实际路径,如此处的文档示例所示,第 3 步:

If that value is supposed to refer to a file, it needs to be in square brackets so it resolves to the actual path, as in the docs example here, step 3:

http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html

希望这是您正在安装的文件之一.

and hopefully that is one of the files you're installing.

这篇关于Wix 安装程序在安装失败后执行程序并显示错误 2896的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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