How do you find the user-selected install path in Inno Setup?

前端 未结 1 1217
别那么骄傲
别那么骄傲 2020-12-18 00:21

I need to get the path that the user chose to install my application into.

If I set CreateAppDir=yes and set a DefaultDirName=C:\\MyApp\\ t

相关标签:
1条回答
  • 2020-12-18 00:58

    Use the {app} constant. The reference describes it as:

    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".

    Optionally you can use the WizardDirValue function. This one is described as:

    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.

    0 讨论(0)
提交回复
热议问题