I added a "3 Radio Buttons" user interface to the setup project, and I am able to read the selected value from a Custom Action.
I need to persist that value. The most common solution is to use the Windows Registry. I am just wondering if we could persist it in the application properties itself, considering that the Installer Class is in the same application that's being installed.
This code doesn't throw any exception:
public override void Install(IDictionary stateSaver)
{
base.Install(stateSaver);
// Get the installation mode
string INSTALLATION_MODE = Context.Parameters["INSTALLATION_MODE"];
// Save the installation mode in the application properties
Properties.Settings.Default.INSTALLATION_MODE = INSTALLATION_MODE;
Properties.Settings.Default.Save();
}
But the actual value is not persisted in the application properties. Much appreciated.