gpt4 book ai didi

wix - WixShellExecTarget 中的开关

转载 作者:行者123 更新时间:2023-12-04 16:48:51 25 4
gpt4 key购买 nike

根据 http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html,从 Wix 安装程序包中,我将在安装结束时启动一个已安装的程序:

<Property Id="WixShellExecTarget" Value="[#myapplication.exe]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />

我现在需要包含一个开关(“/X”)来启动程序,但未能找到如何执行此操作(将其添加到 Value 会禁用程序的启动全部) - 有什么建议吗?谢谢!

最佳答案

WixShellExecTarget must be only the path of the executable/document. There's no support to add arguments. For that, use a "normal" exe custom action instead of WixShellExec.



Because a more typical use case is to launch a document (like a readme.html or .pdf). WixShellExec was designed just for that purpose.



http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Passing-command-line-arguments-to-an-app-launched-after-setup-td1366362.html

您可以使用以下内容替换自定义操作:
<CustomAction Id="LaunchApplication" 
Impersonate="yes"
FileKey="[Id for File element that was installed]"
ExeCommand="/X"
Return="asyncNoWait" />

我猜到了你想要的一些属性,但你可以使用 the Wix CustomAction element reference page想要查询更多的信息。我认为您需要自定义操作类型 18(以运行在此安装期间复制的可执行文件),因此 this example也应该有所帮助。

关于wix - WixShellExecTarget 中的开关,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31305483/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com