Will the software have web access? (just thinking about another idea, such as online validation etc?)
Or do you mean like for example windows, which comes with a supplied code, which then validates against th cd?
BTW - with windows, every license for that version will validate, so you could mix up any win98 license and CD (of same version) and it should still validate ok.
If its on the web, you could generate the codes simply by randomizing them, once you have created enough codes, store them (hardcoded) in your .exe, and make sure you keep a copy of the codes generated..
If a code is entered into your software, it could grab the PC's unique ID, and then tag the ID against the code used, that way in the future, you can keep track of what PC its on using the same code? If it has web access of course.
Not sure if hardcoding is a good idea, as maybe the data could be extracted somehow from the exe? any ideas anybody?
I may be going a bit over the top here, i expect sombody alot more experienced in this will come along shorlty and explain a much simpler method!
The obvious way is to use an algorithm and check the code generated in your app, but im unsure of how to do this properly