Get the path in the wpSelectDir before {app} is set Inno Setup

前端 未结 2 2011
礼貌的吻别
礼貌的吻别 2021-01-14 10:21

I would like to get the path of the install directory, when the user clicks on Next, when I\'m in the wpSelectDir of Inno Setup.

I need to chec

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-14 10:56

    Use WizardDirValue support function:

    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.


    It's more idiomatic than the WizardForm.DirEdit.Text.

    Though internally it does nearly the same:

    RemoveBackslashUnlessRoot(WizardForm.DirEdit.Text)
    

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

提交回复
热议问题