Where should I store my application's “activation” key?

北城余情 提交于 2019-12-03 01:05:13

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.

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)

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.

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.

Paul Alexander

In general, most computers are used by a single user (or multiple people still using the same user account). So a user based storage will work most of the time anyway.

However it's not either/or. There are folder locations that are writable by all users - such as the ProgramData folder. The key is to make the file readable/writable by Everyone so that you can verify the content regardless of the user.

DeployLX Licensing does this for non-secure license data so that it can be used by multiple users without an admin explicitly granting permission.

You should be consistent. If administrator rights were required to install the program, it's not out of line to require administrator rights to register it. Likewise if you somehow managed to install it without administrator rights then register it without too.

If you install and register in one step this won't be an issue.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!