shireburn
Posts: 5
Joined: Mon Aug 12, 2013 9:16 am

Browse for a secondary folder

Hello.
I just created a dialog where the user can specify / browse for a folder to set as the data path.

I followed your "Browse for folder" Page for help. However I noticed that If the user types a non existing folder in the Path edit, the software will automatically creates it. How can we disable the "automatically create folders" function. We just need to specify an existing folder, and popping an error if the folder does not exist.

Thanks.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Browse for a secondary folder

Hi,

I'm afraid that this is the Windows Installer default behavior and it cannot be disabled.

However, in order to achieve what you want you can create your own custom action that search the path entered by the user and if it does not exist an error message is displayed.

You can take a look on the How do I create fully fledged C# custom actions article which may be helpful for you.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”