I have a VS 2010 Setup project. In the setup project I have a custom dialog, and a custom action. Both work, I can even debug my custom action and it receives correctly the input the user provides in the custom dialog.
I would like to validate user input and only allow user go to next step if the input is valid. I can show a messagebox with MessageBox.Show, but how can I prevent to go to the next step until the user corrects the input?
public override void Install(IDictionary stateSaver)
{
base.Install(stateSaver);
string myInput = Context.Parameters["MY_INPUT"]; // Value from custom dialog
if (myInput ..... )
{
// Not a valid input, we do not want to proceed to the next step
MessageBox.Show("Not a valid input, please correct it");
// What to do here?
// How can I tell the Installer do not accept this input?
}
else
{
// Valid input...
}
}
Thx for answers