Is there any way to modify the ‘SerialNumberTemplate algorithm to increase security, other than the default algorithm – The Sum divided by 7?
latoc
---------------------------------------
Hi latoc,
According to my experience, this default algorithm cannot be specified in VS. If you want to verify the serial number in your owner logical, you'd better think of the following two solution.
1. Raise a dialog to let your user input serial number, verify it in your own code, if faild, rollback the installation.
2. Verify serial number at the first run, tell the user to input number, if it success, store the number to the Windows register. Each time run your application, check register for the number first, if there is no valid number there, it indicate your user haven't activate the product.
Please tell me if you have any problem with this.
Sincerely,
Kira Qian
-------------------------------------------------
Hi Rahul SIngi,
That dialog cannot be add in UserInterface wizard. It is raised use custom action. Custom action is the code that will be run during installation. To know about custom action, here is a good sample.
http://www.codeproject.com/KB/install/Installation.aspx
I do not mean the whole sample will implement this. You can first make a form with a textbox and a button, (textbox for product key input, button for submit). Then handle the BeforeInstall event to show that form using ShowDialog method. When user click OK button, validate his product key. If the key is valid, set DialogResult to OK. In your installer class, if the DialogResult is Ok, go on installation. Else call Rollback() force it to cancel installation. That is what I mean.