I believe TGC did it semi like steam.
Each account is an email address, each email address has X# of keys associated with the account. When a program is activated the amount of keys is decreased until it reaches 0.
To do this you could make a front end to an RAR or ZIP with a password, (front end VB/C/ETC). When the user runs the front end it will ask them for their useraccount (or email) and the registration key. Once activated it sends the information to the server, and the server sends a key back based on something (like hard drive serial, computer name, etc).
Once this is done the front end would unpack the program and create a key file based on something on their pc (like hard drive serial). If the key file doesnt match then it's an illegal version.
Punk Buster did it this way with the serial number, and a ton of applications do it as well.
I don't know if it gives you any more ideas but good luck
http://www.gamestack.org