How to code for Custom Dialog in Setup Project?

前端 未结 1 1566
情深已故
情深已故 2021-01-23 10:12

I have created a Setup Project for my .net application. I want to add another dialog after installation folder selection. I have added that dialog from User Interface

1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-23 11:07

    MS seem to have deleted the walkthroughs on how to do this when setup projects were taken out of VS. However if you look at the property window of that RadioButtons(2) dialog you'll see there's an uppercase property name, probably BUTTON2. That will be set to 0 or 1. The way you pass parameters to your install method is like arguments, so you'd add something like /MyButton=[BUTTON2] and I think you need the brackets. Then inside the installer class you can say:

    StringDictionary myStringDictionary = this.Context.Parameters;

    and use the key MyButton on the dictionary to get the value. This should get you close.

    0 讨论(0)
提交回复
热议问题