ajeeshco
Well-known member
Hi,
In a Setup and deployment project i added a dialog called Textboxes (A). In that dialog I have a textbox EDITA1. I would like to know How can I set the Condition Property so that if the user does not enter anything in that textbox the installation should not continue.
To try this from code I created a custom class inherited from Installer but its not working. The code I tried is given below.
Thx in advance.
In a Setup and deployment project i added a dialog called Textboxes (A). In that dialog I have a textbox EDITA1. I would like to know How can I set the Condition Property so that if the user does not enter anything in that textbox the installation should not continue.
To try this from code I created a custom class inherited from Installer but its not working. The code I tried is given below.
VB.NET:
Imports System.ComponentModel
Imports System.Configuration.Install
<RunInstaller(True)> Public Class InstallerConfiguration
Inherits Installer
Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)
MyBase.Install(stateSaver)
If Context.Parameters("MyTextBox") = String.Empty Then
Throw New InstallException("Please enter a value!")
End If
End Sub
End Class
Thx in advance.