How to check a condition before the installation process takes place?

I am creating a Windows application. During the setup process, I added a screen using the properties of the user interface dialog box and took some input from the user and I want to set the condition as follows:

if(value_is_correct)
{ 
   Continue_setup;
}
else
{
   Rollback_setup;
}

Somehow my goal is completed, but I want to change the steps of the process:

  • I ask the user to enter a value (password)
  • User clicks the next button.
  • The following dialog box will appear, the installation process will begin, and between this process it will show that the password is incorrect and it will cancel the setting again.

These images clearly show the process:

asking password

showing wrong password error

My question is: how to check the condition when clicking the "Next" button of the "Password" form (first image). It should not start the installation process.

. .

0

All Articles