mehdi lotfi
mehdi lotfi

Reputation: 11581

Installer Class For Validate Serial Number MS Visual Studio 2010

I create a setup project in visual studio and want to add custom action to validate serial number. How can I do it?

EDIT 1: I add Customer Information dialog in user interface of my setup project, and set ShowSerialNumber property to True. and want to validate entered user serial number , when user click next button on this dialog.

Upvotes: 0

Views: 2263

Answers (2)

Satinder singh
Satinder singh

Reputation: 10208

In VS solution explorer

Right click yoursetup >> View >> USerInterface

Right Click Start >> Add Dialog >> Select TextBox

enter image description here

Now made a Custom Class And add Install class file

In Install.cs

public override void Install(IDictionary stateSaver)
    {
                base.Install(stateSaver);
    }

Upvotes: 1

Xantix
Xantix

Reputation: 3331

Not sure exactly what you want, or what you have tried, still ...

Make a boolean function:

private static bool isValidSerialNumber( string number ) {

}

The way you validate it depends on the type of serial number scheme used,

This might involve performing an RSA decryption on the serial number, or it might be as simple as querying a database or list to see if the serial number is there.

take a look at this question: How are serial numbers generated?

Upvotes: 1

Related Questions