I would like to install my setup content only to one specific directory, so I want to have the Next button on directory selection page disabled, unless the user chooses the right folder to install to.
How can I disable the Next button on directory selection page and enable it right after user chooses a specific directory ?
The following sample shows how to disable the
Nextbutton when you reach theSelectDirpage and enable it only when you enter (or choose from the browse directory dialog) theC:\MySecretDirfolder (theMySecretDirconstant). The comparing is case insensitive since user can enter whatever he (or she) wants.Or if you want to enable the
Nextbutton only if there’s a specific fileMyUniqueFile.exein the chosen directory, modify the code inOnDirEditChangeevent handler this way: