Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
hi,,
I'm building a desktop based application using C# and MySQL and 'm newbie to C#.
I want that application installing first time it ask for license key and it must run only on 10 systems, after that it has to ask again for license key validity for next 10 systems. 'm using visual-studio2010. Help me with procedure to achieve this task and also coding ASAP.

Thank u.
Posted
Comments
Sampath Lokuge 1-Feb-14 1:44am    
Your question is not clear.What you mean by 10 systems.Is that 10 machines or what?
Rahul VB 1-Feb-14 2:36am    
Just a sec...
1> You want to create a setup and deployment project.
2> When you run the setup, it must ask for a licence key.
3> If i perform this setup 10 times, again it should ask for a key.

This means you want to make a software similar to an antivirus setup kind of a thing.
After 10 times its validity should be renewed.

Have i understood correctly?

1 solution

This is not trivial: because you cannot modify your distribution media (or the checking would be futile, anyone could just copy the original files and have ten fresh installs each time) you need to use a more complex system which talks to a central system to "validate" the licence.

Basically, your installation program will have to talk to a website or web service to ensure that there are licences left in your set, and if not refuse the installation.
 
Share this answer
 
Comments
Rahul VB 1-Feb-14 5:27am    
But OG can i do something like this:
When ever i run the program, i enter a count into a database or a file or something like that. Every time when i start my program i will read the file/database or whatever to get the count and increment it. If the count is 10 or greater then i can take some action.

There is a class called Liscence present in system.diagnostics. I can assign a key using that.

Its just a thought is it feasible?
OriginalGriff 1-Feb-14 5:40am    
The Licence you are talking about is applicable only to the one machine - it doesn't check any others. And if you store it in a file or even a DB, the others do not have to use the same PC, and will get their own files...
Rahul VB 1-Feb-14 5:49am    
No no what i mean to say is that in the project it self, if i add a database file and make it secure. I mean deploy that project with the database file. Some or the other way to wrap that file with the project. Can that happen?
OriginalGriff 1-Feb-14 5:57am    
You can...but each time the installation is copied or executed, you get a fresh, empty copy of the database...which kinda defeats the purpose really! :laugh:

Think of it this way: either you release your software as a package on a Read-only media (in which case the disk is the same each time it runs) or you download it - in which case the file is eminently copyable. Each time it is copied, it has a blank, unused licence. If you don't have a centralised licence approval service (as MS do, Adobe do, etc.) then your copy protection is pretty worthless!
Rahul VB 1-Feb-14 7:14am    
Moral of the story... Please dont do what i am saying :laugh) wait there must be a fix

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900