George Hovhannisian
George Hovhannisian

Reputation: 707

How to disable OK button in "Browse For Folder" dialog in Inno Setup

I need to disable the OK button in "Browse For Folder" dialog if

  1. A file (doesn't) exists (preferably with FileExists)
  2. An existing reg key (doesn't) points to that directory (preferably with RegKeyExists RegValueExists)

I do know how to achieve a more-or-less same result by disabling the Next button on wpSelectDir page, but I think "Browse For Folder" dialog would be much more convenient, if it's possible.

Upvotes: 1

Views: 362

Answers (1)

TLama
TLama

Reputation: 76693

That is not possible because the BrowseForFolder function uses internally the SHBrowseForFolder function for the dialog. And that dialog can interact with this function caller only through the passed callback, which is implemented internally and not exposed anywhere.

Upvotes: 2

Related Questions