There's a tool called Orca in the Platform SDK, install it from Orca.msi. You can use this to edit MSI contents. It's rather advanced, and you won't find much documentation about how to edit Dialogs and Controls in the UI because many tools provide UI design in their IDEs. You'll have to add a custom action to your Control that prevents the user going to the next dialog unless the textbox data is correct. This will give you the general idea:
but the details are not accurate for new versions of Visual Studio.
regarding your post above regarding adding a custom action to the control to prevent the user going to the next dialog, I have couple of questions.
If you were to add a custom action, say in the "install" section, it will only get executed after the installation phase is completed correct ? If it is correct, then how will your suggestion of a custom action work before the installation process.
Also in the microsoft support example link you posted, the sample code uses the property, MsiSetProperty, to control whether the next button should be disabled or remain enabled. Is this property part of .net framework or do we have to do import the msi.dll library ?
edit: should be msi.lib not msi.dll
That kb article is about how to hook up a custom action to a button in the UI sequence so that the custom action validates the value of a property. You can actually run custom actions anywhere you want with Windows Installer (as you'd realise if you were using some other MSI-building tool). It's just that Visual Studio's custom actions are restricted to run at the end of the install. The point about using Orca is to edit the MSI file to add a custom action to the UI sequence because you can't do it with VS.
That custom action is C++. You'd need to #include msiquery.h and link to msi.lib.