views:

548

answers:

4

I've written an application and I'd like to add a registration key/serial number to it (I'm big on minimum inconvinience - ala #4 at this Eric Sink article). My question is about where to store the "activation" once the application has been registered. As I understand it, I have a trade-off between storing the key in a public place, where all users can read it (but which requires admin rights to save there) and storing a per-user activation (but then each user on the computer will have to activate independantly). That gives me two choices:

  1. Some user, with local admin rights, activates the product. The activation is stored in HKLM, in the program files folder, or somewhere else where all users can read it, and the product is activated for all users.
  2. A user (with or without admin rights) activates the product. The activation is stored somewhere user-centric (per-user app.config, HKCU, etc). The plus is that the user doesn't have to be an admin. The downside is that if there are 6 users who use the computer, each has to activate the product. They can each re-use the same serial, but they still have to enter it.

Is this really the trade-off? If it is, what have others done? As a developer, I'm used to people being a local admin, but in the real-world, I don't expect many of my corporate users to be local admins, which makes me lean towards option 2. Are computers not shared often enough that I shouldn't be concerned?

Again, I'm not asking about how to physically register a computer - I'm not worried about it. I'm only going to checksum the key provided and give the go-ahead, as I want to be as non-invasive as possible.

+6  A: 

I would recommend a solution that does not require admin rights. Lots of users, especially in shared environments, won't have those rights and won't be able to find anyone with them conveniently.

Also, going forward a few years, I think it will be getting increasingly unusual to have admin rights on the computer you are using, as the security situation improves.

rikh
But it's damn annoying to register the same application again and again on the same computer for different users! I consider this to be a flaw in applications design.
Vilx-
Well, one solution we have used is to put the activation info in the current users registry, then if admin rights are available, put it in local machine as well. If admin rights are available, none of the shared users on the machine are hassled. If no admin rights are available, each user is asked to activate once.
rikh
I like the idea of at least storing it in HKCU, and then also in HKLM if the user has admin rights. That seems like the minimum inconvinience - registration won't *require* admin rights, but will take advantage of them if they're there.
rwmnau
+1  A: 

Registry seems to be an okay solution for business software. At least at where I used to work, regular user will not be a local computer administrator, so each installation will require local administrator account. This is a good thing since it will lessen the headache of your support staff from people installing just about everything in your business computing environment. The trade off is of course, user will be pissed that they can't install stuff or have to contact support to do it, but hey... :)

Other stuffs:

  • USB / other type of dongle (ala old 3DMax)
  • plain old text file (ala Garmin GPS software on mobile device)
  • Encode them / rewrite the key into your binary or part of your binary (did this trick back in th old DOS days)
  • Store them in your own db via web (ala EverQuest / other MMORPG games)
  • Local key db (ala MathLab I think)
Jimmy Chandra
A: 

We save our activation code to the registry for the current user (HKCU) we have had very little problems with it. Our customers run on everything from home computers to thin clients on cooperate networks.

If your software will be used in schools or other educational environments you need to provide some other method. It could be as simple as a separate registration application which will save to the activation for all users. Your software would have to do two registry lookups but that is a small price to pay.

Peter Olsson
A: 

How about using the isolated storrage for you application?

You will have the ability to store this information on a mashiene level for your registration, and the configuration changes can be persisted on a user level.

Heiko Hatzfeld
Can you give an example of how I might accomplish this? I'm not familiar with the term, so I want to make sure I understand your idea.
rwmnau
You can find an example here:http://msdn.microsoft.com/en-us/library/system.io.isolatedstorage.isolatedstoragefilestream(VS.71).aspx
Heiko Hatzfeld
Edit: This one is better : http://msdn.microsoft.com/en-us/library/bdts8hk0.aspx
Heiko Hatzfeld