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

前端 未结 2 2028
礼貌的吻别
礼貌的吻别 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条回答
  •  忘掉有多难
    2021-01-14 11:12

    You can do something like this....

    procedure onDirChange(Sender: TObject);
    var
        currentDir: String;
    begin
        currentDir := WizardForm.DirEdit.Text;
        // your validation goes here....
    end;
    
    procedure InitializeWizard;
    begin
        WizardForm.DirEdit.onChange := @onDirChange;
    end;
    

    The WizardForm.DirEdit.Text returns the current value in the DirEdit Text Box. The procedure onDirChange is called everytime the text in the dirEdit text box changes. You can use this value to perform your validations.

提交回复
热议问题