views:

31

answers:

1

Using WiX, what's the simplest way to disable the Next button on a page until the user has entered a well-formed GUID in an Edit (textbox) control?

I expect the answer to be Condition elements within the Next button control, but I can't figure out what the conditions would be. Do conditions support regular expression matching?

+1  A: 

I doubt it, but you might be able to have a custom action that runs a script (e.g. .vbs file, an example of a CustomAction that runs a script can be found here) which would take that value and check if it's valid. VBScript supports regular expression (see here). That script would then set some property to true or false depending on if the guid is valid. This property would then be used in the condition.

steinar
Just a general warning about script custom actions: http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx
Yan Sklyarenko
@Yan Thanks for that! Good to know how Rob feels about this. To paraphrase: Using scripts in CustomActions can be opening a can of worms.
steinar