Hi, contacthanu,
It seems that calling RollBack method will not invoke the roll back process, and this method is called when the Setup is in Rolling Back process.
However, you can throw an InstallException to causethe Setupto roll back.
Please check the following sample.
Code Snippet public override void Install(IDictionary savedState)
{
base.Install(savedState);
regForm form = new regForm();// You can add your validation codes here.
form.ShowDialog();
if (form.rollback == true)
{
this.Dispose();
throw new InstallException("Reg code incorrect");
}
else if (form.rollback == false)
{
System.Windows.Forms.MessageBox.Show("Install");
}
}
public override void Rollback(IDictionary savedState)
{
base.Rollback(savedState);
}
Hi, contacthanu,
It seems that calling RollBack method will not invoke the roll back process, and this method is called when the Setup is in Rolling Back process.
However, you can throw an InstallException to causethe Setupto roll back.
Please check the following sample.
Code Snippet public override void Install(IDictionary savedState)
{
base.Install(savedState);
regForm form = new regForm();// You can add your validation codes here.
form.ShowDialog();
if (form.rollback == true)
{
this.Dispose();
throw new InstallException("Reg code incorrect");
}
else if (form.rollback == false)
{
System.Windows.Forms.MessageBox.Show("Install");
}
}
public override void Rollback(IDictionary savedState)
{
base.Rollback(savedState);
}
You can use google to search for other answers
|