jdtoronto has asked for the wisdom of the Perl Monks concerning the following question:

Esteemed monks,

My Perl/Tk based Windows monster grows apace, and now the overlord (my client) deems it necessary to have some sort of registration / validation / activation 'thing' tacked on to it. Of course, he like most of the great un-washed is aware of Microsoft's monstrosity. I, on the other hand, am opting for something a little simpler.

When the user enters the 'disk key' which is supplied with the product the registration information is sent, along with some data which gives a footprint of the computer, to the registration server. Once this has all been validated I want to send back a structure which has been encrypted. This should be stored on the users PC.

My question is - WHERE? I will want to read it each time the application starts, but I am unsure as to where I should put it.

jdtoronto

  • Comment on [OT] Software registration and activation.

Replies are listed 'Best First'.
Re: [OT] Software registration and activation.
by andyford (Curate) on Aug 11, 2006 at 19:59 UTC
    I've never had to do this myself, but observing what vendors do, I'd say most use the registry, but some use a plain file.
    Seems like with the registry method, the customer is "forced" to go back through your supplied installation procedure to move the app around in the filesystem, but with a file-based key, the customer can just move the thing with no hassle.
Re: [OT] Software registration and activation.
by rodion (Chaplain) on Aug 11, 2006 at 21:38 UTC
    I agree with andyford that the Registry and config files are your basic to choices. For the registry, take a look at Win32::TieRegistry. If you're not storing any path address in the registry, then you should be able to move your program around to other directories on that same machine, but not to another machine, without reinstalling. This can be seen as good or bad, depending on what you want.

    One of the advantages of Eudora for email, at least the older versions that I still use, is that you can pick up the whole directory tree and copy it to a new machine, and everything works. That's really nice. They put the config and registration info in a local config file to make this possible. You can still incorporate a user name in an encryted key to give some small measure of protection. For this approach take a look at modules like Config::INI::Simple, Config::IniHash or AnyData to read and write config files. The config file often goes in the same directory that your code is installed in.