Groups | Blog | Home
all groups > dotnet setup > october 2006 >

dotnet setup : How to add validations in a dialog for the setup project


Yash
10/30/2006 8:21:01 PM
Hi,

I have some custom text boxes as part of my deployment installation
program(this is .NET setup project) and I would like to know how to validate
these text boxes so that if they are left blank then a message pops up.

One can add dialog of type "Textboxes" and set the properties such as
"EditLabel", "EditProperty", "EditValue", "EditVisible" for each textbox. But
i just want to have a simple validation that the text box should not be empty.

Let me know if there is anything i can do to make sure it works. I have
invested considerable time in .NET setup project and i dont want to move to
other tech like WIX etc.

Phil Wilson
10/31/2006 1:29:06 PM
If you want to validate textboxes in Visual Studio dialogs, the bad news is
that VS supplies no hooks (like custom actions) on buttons in the UI
sequence. That's why this article exists, for example, to validate a serial
number:
http://support.microsoft.com/kb/253683/en-us

So either way you have to invest more time, either on Orca and changing the
MSI file to do your validation, or moving to another tool (I guess I
shouldn't mention Wix).
--
Phil Wilson
[Microsoft MVP - Windows Installer]
[quoted text, click to view]

AddThis Social Bookmark Button