Windows安装程序自定义操作错误1631(Windows installer custom action error 1631)

编程入门 行业动态 更新时间:2024-10-24 22:21:28
Windows安装程序自定义操作错误1631(Windows installer custom action error 1631)

我为产品创建msi-installer,安装后需要在浏览器中启动web url。 我使用WIX 3.5创建安装程序(但这可能并不重要)。 我在http://www.tramontana.co.hu/wix/lesson5.php#5.2中找到的例子不起作用 - installer log say's

“行动结束15:27:30:启动浏览器,返回值1631.”。

我在互联网上看到很多关于这个问题的文章,但没有人提供解决方案(有人发现多语言问题,有人联系微软解决这个问题)。

我只能猜测,这个问题是在Windows 7的安全性的地方(我遇到了问题)。 也许Windows安装程序被禁止启动exe文件(我尝试了许多其他exe文件的例子,但都有相同的结果)。

有没有人有一个通用的解决方案

I'm creating msi-installer for a product and I need to launch web url in browser after installation. I use WIX 3.5 to create installer (but this probably doesn't important). The example I found in http://www.tramontana.co.hu/wix/lesson5.php#5.2 not work - installer log say's

"Action ended 15:27:30: LaunchBrowser. Return value 1631.".

I saw many posts about this problem in the internet but nobody provides solution (somebody found problem in multilanguage, somebody contacted Microsoft to solve that).

I can only guess that the problem is somewhere in security of Windows 7 (I encountered problem with it). Maybe windows installer is forbidden to launch exe-files (I tried many other examples with other exe-s but all had the same result).

Has anybody a general solution?

最满意答案

我想这个问题真的与UAC安全。 为了给定一个自定义的actinon管理权限,我们应该使它得到缓存,如下所示:

<CustomAction Id="LaunchBrowser" Directory="TARGETDIR" Impersonate="no" Execute="deferred" ExeCommand="[BrowserExePath] [LaunchingUrl]" Return="check"/>

我会强烈推荐这篇关于自定义操作的博客文章 - 它彻底改变了我对它们的看法。

I suppose the problem was really with UAC security. To give a custom actinon administrative permissions we should make it deffered, like this:

<CustomAction Id="LaunchBrowser" Directory="TARGETDIR" Impersonate="no" Execute="deferred" ExeCommand="[BrowserExePath] [LaunchingUrl]" Return="check"/>

And I would highly recommend this blog post about custom actions - it completely changed my vision of them.

更多推荐

installer,问题,problem,启动,电脑培训,计算机培训,IT培训"/> <meta name="descr

本文发布于:2023-07-25 10:41:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1260009.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自定义   安装程序   错误   操作   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!