if one installer class in my project and in custom action doing some procedure to validate the serial key using user interface editor during setup creation.

while installing the set up if the condition is not true the setup in rolling back it is installing.

code is as below that

Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)
        Try
            MyBase.Install(stateSaver)
            myInput = Me.Context.Parameters.Item("Message")
            If myInput Is Nothing Then
                myInput = "Please Enter the Serail Key"
            ElseIf checkserailkeyas(myInput) = True Then
                MsgBox("Registratrion Sucessfull")
            Else
                ''MsgBox("Entered Key is Not Valid")
                Throw New InstallException("Rollback Transaction")
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub


    Public Overrides Sub Commit(ByVal savedState As System.Collections.IDictionary)

        MyBase.Commit(savedState)
        System.Diagnostics.Process.Start("http://www.microsoft.com")
    End Sub

    Public Overrides Sub Rollback(ByVal savedState As System.Collections.IDictionary)
        MyBase.Rollback(savedState)
    End Sub

 Public Overrides Sub Uninstall(ByVal savedState As System.Collections.IDictionary)
        MyBase.Uninstall(savedState)
    End Sub

please provide some help.......


Thanks in Advance

Can you please share how do you integrate serial key authorization within your project?
Much appreciated. You can PM me if you don't mind.

Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.