tags:

views:

324

answers:

1

How do you create a "Browse" button in a WIX dialog.

I currently have a custom dialog box with four radio buttons (Dev, QA, Stage, and Prod), and a text field for a filename.

The install of course dies if the user enters a bad filename. I would be happy first of all just to verify that the file they entered exists.

Secondly, I would like to add a File-Browser button, if such things exists in WIX. But even then, I would imagine the user could type in any file name, and I should still check to see if it exists.

Thanks,

Neal Walters

+1  A: 

For the first question, you'll have to write a custom action that verifies the file exists. I'd do this in a declarative manner where the custom action gets a file name from a Property and writes out a property with the result. The you can use that in your Publish elements to ensure the result is success.

For the second question, the WiX toolset has the BrowseDlg.wxs that should show how to create the user experience you want.

Rob Mensching
Hi -thanks. I'm assuming this is correct. I'm on at a different client now, and may have to return to this issue one day.
NealWalters

related questions