WiX Burn:LaunchTarget 失败,错误为 0x80070002 [英] WiX Burn: LaunchTarget fails with error 0x80070002

查看:36
本文介绍了WiX Burn:LaunchTarget 失败,错误为 0x80070002的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

设置 LaunchTarget 例如到cmd.exe"就可以了,安装烧录包后,弹出想要的命令行窗口.但是,将 LaunchTarget 设置为例如[InstallFolder]\Path\To\Postinstallexecutable.exe"会产生错误:

Setting LaunchTarget e.g. to "cmd.exe" works fine, after the installation of the burn package, the desired command line window pops up. However, setting LaunchTarget to for example "[InstallFolder]\Path\To\Postinstallexecutable.exe" yields an error:

Error 0x80070002: Failed to launch target: C:\Program Files (x86)\Path\To\Postinstallexecutable.exe

路径正确,在命令行执行C:\Program Files (x86)\Path\To\Postinstallexecutable.exe"工作正常.这是一个错误还是我错过了什么?WiX 工具集版本为 3.8.309.0.

The path is correct, executing "C:\Program Files (x86)\Path\To\Postinstallexecutable.exe" at the command line works fine. Is this a bug or am I missing something? WiX toolset version is 3.8.309.0.

更新: 经过多一点测试,问题似乎只有在您尝试将参数传递给 LaunchTarget 中的命令时才会出现.所以例如使用

Update: After a little more testing, the problem seems to occur only when you try to pass a parameter to the command in LaunchTarget. So for example using

<Variable Name="LaunchTarget" Value="[InstallFolder]\Basiskomponenten\Allgemein\test.cmd" />

有效,同时

<Variable Name="LaunchTarget" Value="[InstallFolder]\Basiskomponenten\Allgemein\test.cmd Test123" />

导致 0x80070002 错误.

results in an 0x80070002 error.

推荐答案

LaunchTarget 变量仅指向应该启动的可执行文件,不能提供命令行参数.直到最近的 WiX v3.8 版本,您才可以设置名为 LaunchArguments 的第二个变量来提供参数.因此,尝试升级到昨天的 WiX v3.8 版本(或更新版本)并执行以下操作:

The LaunchTarget variable points only to the executable that should be launched, it cannot be provided the command-line arguments. It wasn't until a very recent build of WiX v3.8 that you could set a second variable called LaunchArguments that provides the arguments. So, try upgrading to yesterday's WiX v3.8 build (or newer) and do:

<Variable Name="LaunchTarget" Value="[InstallFolder]\Basiskomponenten\Allgemein\test.cmd" />
<Variable Name="LaunchArguments" Value="Test123" />

这篇关于WiX Burn:LaunchTarget 失败,错误为 0x80070002的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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