1

I've started to create installer for my application using Setup Project in Visual Studio, I've made User Interface with two radio buttons.

There it is what i'm talking about enter image description here

I want to get access to values of these radiobuttons in c#, but I completely have no idea how. Can any1 help me ?

PhilDW
  • 20,260
  • 1
  • 18
  • 28
d3st1ny
  • 75
  • 1
  • 13

1 Answers1

1

Assuming that getting them in C# means that you have a custom action installer class that you wish to pass the values to:

DOMAINLOCALVALUE appears to be the name of the property associated with the radiobutton. In the properties window of the custom action you want to pass the value into, in the CustomActionData field, you put something like /DLV=[DOMAINLOCALVALUE] and then in your installer class you get the value with this.Context.Parameters["DLV"]

That's the basics of what's described here:

http://www.c-sharpcorner.com/article/customize-user-interfaces-and-pass-user-input-to-installer-c/

If you want to pass it to a C# executeable or something else then you'll need to be more precise about exactly what "get access to values of these radiobuttons in c#" means.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
  • For some reason when I do this, this.Context is null and I cannot access any parameters. Any idea what I could be doing wrong? – jkamdjou Jun 15 '18 at 01:23
  • "Error 1001. Unable to create an instance of the MyAssembly.Installer1 installer type. Exception has been thrown by the target of an invocation. Object reference not set to an instance of an object." – jkamdjou Jun 15 '18 at 01:46