Custom Installer using vb.net or c#.net - need help
-
I am trying to create a password protected installer using c#.net. I have added a textbox(A) type to setup. In my installer class I am verifying this input text (which is supposed to be the password) in OnBeforeInstall() method. What I did is just through an exception from this method so that installation will not take place. However this code fragment is not effective when I installed in my machine. Can somebody advise on the correct usage model? Here is my code segment: >>> Protected Overrides Sub OnBeforeInstall(ByVal stateSaver As System.Collections.IDictionary) Dim myInputCompanyName As String = Me.Context.Parameters.Item("Message") MessageBox.Show(myInputCompanyName) Try Throw New Exception("Invalid Company Name or Key") Catch ex As Exception End Try End Sub >>> Thanks in advance.
-
I am trying to create a password protected installer using c#.net. I have added a textbox(A) type to setup. In my installer class I am verifying this input text (which is supposed to be the password) in OnBeforeInstall() method. What I did is just through an exception from this method so that installation will not take place. However this code fragment is not effective when I installed in my machine. Can somebody advise on the correct usage model? Here is my code segment: >>> Protected Overrides Sub OnBeforeInstall(ByVal stateSaver As System.Collections.IDictionary) Dim myInputCompanyName As String = Me.Context.Parameters.Item("Message") MessageBox.Show(myInputCompanyName) Try Throw New Exception("Invalid Company Name or Key") Catch ex As Exception End Try End Sub >>> Thanks in advance.