We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

ddjong
Posts: 1
Joined: Tue Mar 04, 2014 1:43 pm

How to disable 'next' btn and show dlg if folder not exists?

Dear all,

I am sure this has been asked before, but i am new to advanced installer. I want to copy files to directory of web server (physical location) but that directory must already exists. I have multiple locations where i need to write files into (web content, dll content, sql content ...) so i must make my own wizards. Now i have made my own wizard (with trial edition of advanced installer enterprise where we initially bought professional edition but want to test if it is working before we upgrade).

In that wizard i have pathedit control + browse button. I want to have following logic:

1. if either manually a folder and that folder is not existing, it must DISABLE next button and if it is valid folder it must ENABLE the next button.

2. When user enters an invalid / non existing folder also a dialog must pop up 'Folder %s does not exist' ...

I tried with conditions on the next button but could not get it working. But i am also new to advanced installer. Maybe someone has a sample project where such an issue is worked out ... That would be very helpful. ....

Dick de Jong
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to disable 'next' btn and show dlg if folder not exi

Hello Dick and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

In order to achieve what you want you should follow our "Browse For Folder" article steps to implement desired scenario. Then, you should create your own custom action which will check if the entered path exists or not and set an installer property accordingly (AUX_PROP). The custom action should be triggered on [Next>] button from your custom browse for folder dialog. Finally, you should display a specific child dialog if the entered path doesn't exist.

Here are the steps to proceed:
- implement our "Browse For Folder" article steps
- on the [Next>] add, as a published event, your check user's entered path custom action (your own custom action which will check if the path entered on "MY_DIR" path edit control exists or not and then will set an installer property - AUX_PROP - with a specific value, e.g. "true" or "false")
- into the "Published Events" tab of the above [Next>] button add, as the last events in list, a "Display a specific child dialog" event which will display a spawn dialog with a desired message

Also, if you don't necessarily need to allow users to directly edit your "MY_DIR" edit path and then check the entered path, then you can enable its "Read-only" attribute.In this case you shoul also enable the "Enhanced User Interface" feature.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”