gpt4 book ai didi

inno-setup - 您如何在Inno Setup中找到用户选择的安装路径?

转载 作者:行者123 更新时间:2023-12-04 06:59:53 25 4
gpt4 key购买 nike

我需要获取用户选择的将我的应用程序安装到的路径。

如果我设置了CreateAppDir=yes并设置了DefaultDirName=C:\MyApp\,则用户可以将其更改为其他目录。完成此操作后,我需要知道他们在下一步安装向导步骤中选择的目录。我如何获得该值(value)?

最佳答案

使用 {app} 常量。该引用将其描述为:

The application directory, which the user selects on the Select Destination Location page of the wizard. For example: If you used {app}\MYPROG.EXE on an entry and the user selected "C:\MYPROG" as the application directory, Setup will translate it to "C:\MYPROG\MYPROG.EXE".



(可选)您可以使用 WizardDirValue 函数。这个描述为:

Returns the current contents of the edit control on the Select Destination Location page of the wizard.

Unlike ExpandConstant('{app}'), this function will not fail if called after the wizard is shown but prior to the user selecting a directory. Rather, it will return the default directory name.

关于inno-setup - 您如何在Inno Setup中找到用户选择的安装路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28349106/

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