Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I require a serial number for my app?

Status
Not open for further replies.

mark01

Technical User
Jan 17, 2001
600
0
0
US
I have an application, and want to require a specific serial number in order for the app to work. Here is my code so far, it is very simple...

If Text1.Text = "TIW3289" Then
MsgBox "Product Registered... "
'etc
Else
MsgBox "You've entered the wrong registration code"
End If

This works wonderfully for what I am trying to do, but when I load my programs .exe into a text editor, I can see the "TIW3289" in plain text!! I really don't want anyone knowing the serial number. How can I fix this??
 
Code:
If Text1.Text = "T" & "I" & "W" & "3" & "2" & "8" & "9" then
MsgBox "Product Registered... "
'etc
Else
MsgBox "You've entered the wrong registration code"
End If

This seems to do the trick.

---------------------------------
LendPoint Software
 
Be even more creative than that. Generate a MD5 hash of a username and company and grab parts of the hash to make up a serial.
 
Thanks, lendpoints way seemed to do the trick. I don't know how to generate a MD5 hash. So I'll just stick to the easier way.
 
It's a lot more than your looking for, but another solution is to use a 3rd party tool for this. I use Armadillo which is simple to use, secure and inexpensive. I don't work for them, just use the product. There are others out there as well.
 
Generating an MD5 hash is reasonably simple. thread222-764228 suggests a couple of ways (although no code is provided, except in the link to my CryptoAPI code)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top