Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > SerialNumberTemplate algorithm
 

SerialNumberTemplate algorithm

Is there any way to modify the ‘SerialNumberTemplate algorithm to increase security, other than the default algorithm �The Sum divided by 7?

latoc

latoc  Friday, August 07, 2009 9:27 PM
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
Please mark the replies as answers if they help and unmark if they don't.
  • Marked As Answer bylatoc Monday, August 10, 2009 1:17 PM
  •  
Kira Qian  Monday, August 10, 2009 9:35 AM
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
Please mark the replies as answers if they help and unmark if they don't.
  • Marked As Answer bylatoc Monday, August 10, 2009 1:17 PM
  •  
Kira Qian  Monday, August 10, 2009 9:35 AM

Hello Kira

Thank you confirming no modification allowed. I will rely on one of your suggested alternatives.

Regards

latoc

latoc  Monday, August 10, 2009 1:17 PM
Hi Kira ,
I also face the latoc problem your suggestion was very good. But please told me how to raise a dialog for taking input in the UserInterface wizard for that
Sicerely
Rahul Singi
Rahul SIngi  Thursday, August 13, 2009 8:53 AM
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.

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Thursday, August 13, 2009 9:07 AM

You can use google to search for other answers

Custom Search

More Threads

• Launching ClickOnce app from a popup window in IE7
• Setup package question
• Deployed application breaks when it's auto-updated.
• how to launch application at the end of installation?
• Installation wizard for my .NET project
• Hiding the Restart dialog box of 3rd party package(setup.exe, may be built from InstallShield)
• ClickOnce and EULA
• how to migrate db to new release w/o refresh?
• Registry Keys are removed during uninstall
• A couple of Setup newbie questions