Software activation codes and storage, your thoughts please

  • Thread starter Thread starter Joe_Black
  • Start date Start date
J

Joe_Black

Hi all,

I have an app that I want to have activation codes for, it has plugin
dll files each of which have an activation code as well. I need to
generate a unique code that is specific to the machine that the software
is installed on, when the user contacts the registration server the key
that they get to activate there software will be unique to there machine
as it will be generated from the code above. Please could you look at
these possibles and advise on which you think is the right way to do
this, or if you know of a better way I would appreciate any links/code
samples you may have.

I could create a GUID the first time I start the app, this would be
stored in the registry, when validating codes I would read this value
from the registry, check it and activate the software if all is OK.
BUT, I hear that the use of the registry is not a great idea any more,
Microsoft recommends XML files, I must store this value outside of the
apps directory in case the user simply copies the entire directory to a
new PC and all would work, maybe I could store it in Windows directory
in a .cfg file or something.

I could use WMI to get the serial number of the mother board, I would
not need to store this value as it would be available through WMI at any
time.
BUT I want to the app to run on Win 98 upwards, I have heard that WMI is
not supported on Win 98, also I can't find any examples of how to
retrieve the mother board serial number.

This app will be developed in VS2005, the Beta2 has a Go Live license
with it and the development time will be 6 - 12 months, Is there
something in VS2005 that would negate the need to do either of the above?

Is there another way?

And why do my posts always seem so long :-)

Thanks Joe
 
Joe,

Your only option here is going to be to use the registry. You should
probably store it in the HKEY_LOCAL_MACHINE hive, under the software key.
This is the only thing that one could guarantee would work on windows 98.

Honestly though, I don't know how much longer 98 is going to be around,
and I personally wouldn't target an app for that OS. Then again, my needs
are different =)

If you could eliminate 98 from the picture, I would recommend using
Isolated Storage, as it would give your application a space that it could
read/write files from/to, without having to worry about access rights and
whatnot.

Hope this helps.
 
Thanks Nicholas,

Unfortunately the people who are going to be using this app have a lot
of Win 98 laptops, so I'm kind of stuck with supporting it :-(.

Many thanks for your thoughts.

Joe
 
Back
Top