how to create msi installer in VS2010 with custom licence validation

620 Views Asked by At

I have 2 functions:getLicence() which returns licencekey as string and validateLicence() which returns true if validation successful.I have following requirements

  • I want to create msi installer in VS 2010 which calls that getLicence() and shows the licencekey.

  • and at the same time it will ask to enter licencekey and call the validateLicence() if validation successful,it will installed else not installed showing message "Invalid Licence key";

getLicenceKey() uses AesCryptoServiceProvider to encrypt the machinename and generate the licencekey and validateLicence() takes the licence key entered by the user and decrypt and validate.

I am using C# (WCF) I am able to create a MSI installer but I don't know how to call these two functions by the installer (so that user having licencekey can install my application only on one machine).

1

There are 1 best solutions below

0
On

It sounds like you'll want to look into Custom Actions - http://msdn.microsoft.com/en-us/library/9cdb5eda.aspx