How to add a checkbox in final step to lauch a exe in VS2010 setup project?

前端 未结 3 1106
我在风中等你
我在风中等你 2020-12-21 21:47

Currently, I\'m following the steps described here to add a checkbox in the final step, but it seems that the checkbox still exits when I do the uninstallation. Does anybody

相关标签:
3条回答
  • 2020-12-21 21:53

    Alexey's answer works except the condition should be 'Installed', not 'NOT Installed'. Also, there is a superfluous double quote in the sql INSERT statement. So the working answer should be:

        WScript.Echo("Updating the ControlCondition table...");
    sql = "INSERT INTO `ControlCondition` (`Dialog_`, `Control_`, `Action`, `Condition`) VALUES ('FinishedForm', 'CheckboxLaunch', 'Hide', 'Installed')";
    view = database.OpenView(sql);
    view.Execute();
    view.Close();
    
    0 讨论(0)
  • 2020-12-21 22:01

    You have add condition for your checkbox, look at ControlCondition Table. The script from your link adds CheckBox control to Finish dialog, and you have to add the following row to ControlCondition table:

    Dialog_ = FinishedForm
    Control_ = CheckboxLaunch
    Action = Hide
    Condition = NOT Installed
    

    To do it add the following code to the script:

    WScript.Echo("Updating the ControlCondition table...");
    sql = "INSERT INTO `ControlCondition` (`Dialog_`, `Control_`, `Action`, `Condition`)" VALUES ('FinishedForm', 'CheckboxLaunch', 'Hide', 'NOT Installed')";
    view = database.OpenView(sql);
    view.Execute();
    view.Close();
    

    Substitute FinishedForm and CheckboxLaunch with the values you use.

    0 讨论(0)
  • 2020-12-21 22:06

    You can try using control conditions to hide the checkbox during uninstall. For example, you can hide it when:

    REMOVE = "ALL"
    
    0 讨论(0)
提交回复
热议问题