0

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.

4

1 回答 1

0

经过深入研究,我得出结论,我们确实必须使用 Windows 注册表来保存这些安装参数。谢谢你。

于 2013-08-29T01:53:32.117 回答