gpt4 book ai didi

variables - 如何访问 .exe 运行 Wix Bootstrap 的文件夹?

转载 作者:行者123 更新时间:2023-12-05 01:47:35 25 4
gpt4 key购买 nike

我有一个 Bootstrap ,我想将其内容安装到与运行 Bootstrap .exe 相同的目录中。当用户按下“启动”按钮时,该可执行文件将运行。我如何引用这个目录?

我试图通过 MsiProperty 将 $(sys.CURRENTDIR) 传递给 MSI,但查看日志文件时,CURRENTDIRECTORY 和 INSTALLFOLDER 不匹配。

CURRENTDIRECTORY=C:\Users\nickd\Desktop\WixTestingInstall\CW6安装文件夹=C:\VB6\CW6\CW6.root\CW6\PreReqsInstaller\

如有任何帮助,我将不胜感激。

最佳答案

您可以尝试使用 burn 内置变量:

WixBundleOriginalSource - gets the source path from where the bundle originally ran. WixBundleOriginalSourceFolder - gets the folder from where the bundle originally ran.

WIX Built-In variables

正如@SeanHall 在下面评论的那样,这些变量仅适用于 WiX 3.9.526.0 版本

做这样的事情:

    <Variable Name="InstallFolder" Type="string" Value="[WixBundleOriginalSourceFolder]" />

<MsiPackage
Id="msiforinstall"
Compressed="yes"
SourceFile="sourcepath"
Vital="yes">
<MsiProperty Name="INSTALLLOCATION" Value="[InstallFolder]" />
</MsiPackage>

关于variables - 如何访问 .exe 运行 Wix Bootstrap 的文件夹?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24068798/

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