Pass (Send) Radio Button selection to Setup file in Windows Application using C# and VB.Net

Last Reply 15 days ago By dharmendr

Posted 19 days ago

While installing my VB.net application , I want to make radio button selection option.when user selecting radio button, that value has to be stored in a pubilc variable in setup file vb.net. How to do this?

I refer this link to create radio buttons in setup project

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

But this shows me error like this

Object reference not set to an instance of an object.

I use following code in installer class:

Imports System.Configuration.Install
 
Public Class DBSinstaller
 
    Public Sub New()
        MyBase.New()
 
        'This call is required by the Component Designer.
        InitializeComponent()
        'Add initialization code after the call to InitializeComponent
    End Sub
    Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)
        Dim myPassedInValue As String = Me.Context.Parameters("SERVER")
        licMode = myPassedInValue
    End Sub
End Class

 

Posted 15 days ago

Please check the Parameter name which you set in the property window while configuring. There only you might not getting the value from the parameter.