Entering a path to a non-available location - Advanced Installer Community

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!

BobM
Posts: 11
Joined: Tue Aug 22, 2006 9:05 am

Entering a path to a non-available location

Hi,

I have a custom dialog with a PathEdit control and an associated Brows button (linked forward to a BrowseDlg). The property of the PathEdit control is set in a custom action prior to the dialog being displayed, so that is reflects a setting from a registry key - all that works fine when the path is available.

However, when the specified path is not be available (say the server is not available), when my custom dialog is about to be displayed, I get an error "The specified path is not available..." and the setup terminates before displaying my dialog.

I have tried making the PathEdit box a standard Edit box instead, but then I get the same error if I press an associated Browse button to open a BrowseDlg.

So, how do I allow the user to select a non-available path?

TIA
Bob
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

This is because windows installer tries to resolve that path before sending it to the PathEdit control. So you need to specify a default value (a valid one) for the property of the PathEdit control (see the PathEdit of the "FolderDlg" dialog as example).

You can define a property (upper case) in the "Install Parameters" page with a default value and use it as property for the PathEdit control.

Now in your custom action change the property value of the PathEdit control only if the registry value is available.

Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
BobM
Posts: 11
Joined: Tue Aug 22, 2006 9:05 am

Thanks for that advice, but I need to display the path, available or not, in the edit field, and be able to browse for it.

I have resolved this by using a normat edit box, and using a dll custom action for browsing using the Windows shell SHBrowseForFolder function, and returning the entered path with MsiSetProperty. This seems to work how I want.
Thanks again
BM

Return to “Common Problems”