0

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.

Satinder singh
  • 10,100
  • 16
  • 60
  • 102
mehdi lotfi
  • 11,194
  • 18
  • 82
  • 128

2 Answers2

1

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?

Community
  • 1
  • 1
Xantix
  • 3,321
  • 1
  • 14
  • 28
1

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);
    }
Satinder singh
  • 10,100
  • 16
  • 60
  • 102