Answer
Many developers create .MSIs that require a product ID or serial number in order to prevent software piracy. The ProductID is a predefined Windows Installer property that contains the full product ID after a successful validation. On the User Information dialog, users enter a product ID or serial number provided by the vendor. Upon a successful validation, the ProductID property contains the number entered.
Windows Installer uses the ValidateProductID action or the ValidateProductID Control Event to evaluate the numbers entered based on a template stored in the PIDTemplate property. The template is designed by the developer of the .MSI during design time, and the MaskedEdit Control will appear on the User Information dialog according to the PIDTemplate. If the ValidateProductID action or ValidateProductID validates the PIDKEY entered by the user based on the PIDTemplate, then the ProductID is set and the .MSI continues to run the installation.
Windows Installer does not actually validate the value of the serial number. It only checks that the format of the value entered matches the format designed in the PIDTemplate. To evaluate the ProductID or serial number to determine if it is legal or valid, you need to add additional checking methods, such as a .DLL, using a custom action. The steps below provide an example of utilizing the ProductID feature with Windows Installer.
This feature is useful to prevent software piracy. Users must enter a valid serial number to complete the installation. Windows Installer allows you to define a PIDTemplate in your .MSI, which it uses to validate entered serial numbers. If the serial number is valid, then the ProductID property is set and the installation can be completed. For more information on this feature, please see the Windows Installer SDK and search for "ProductID" under the Search tab.
If you need further customization to validate a ProductID, then you will need to create your own .DLL to handle the task.