我正在开发一个Windows应用程序。这就要求用户在注册使用它... 现在,我在我的存储在应用程序数据文件的许可信息。但是,删除该文件重置试用版的日期。所以,我现在打算将它保存在注册表中。 但是,大多数用户不会有管理权限(受限用户)在Windows中访问注册表。 我能做什么 ?我在哪里可以救我的序列号和日期?
I am developing a Windows Application. That requires users to register to use it... Now, I am storing my license info as a file in APpData. But deleting that file resets the trial version date. So, I am now planning to save it in registry. But, Most of the Users will not have administrative privileges (Limited Users) in Windows to Access the registry. What can I do ? Where can I save my serial number and date ?
在我看来,关键是你必须改变如何您管理您的许可证。
In my opinion the point is you have to change how you manage your license.
如果他们删除许可证数据文件,然后重新启动审判?不要启动应用程序,如果文件不存在,并与它的安装了安装操作第一次创建它。
If they delete license data file then trial restarts? Do not start application if file doesn't exist and create it with an install action first time it's installed.
现在你面临的第二个问题:如果他们卸载并重新安装应用程序?第二步是到本文件移动到应用程序数据文件夹(例如的 Environment.SpecialFolder.CommonApplicationData )。这是更安全的只是一点,它仍然可以为他们手工查找和删除(因为应用程序数据不会被卸载时删除),但。如果应用程序将通过低权限的用户可以安装没有什么可以做,(你不能尝试的隐藏的某处注册证)。
Now you face a second problem: what if they uninstall and reinstall application? Second step is to move this file to application data folder (for example Environment.SpecialFolder.CommonApplicationData). This is just little bit more safe (because application data won't be deleted when uninstall) but it's still possible for them to manually find and delete it. If application will be installed by low privileges users there isn't much you can do (you can't try to hide license somewhere in Registry).
现在是你的饼干的之间的博弈。他们会取胜,始终。你只会使合法用户的生活更辛苦,所以看的暨花岗SALIS 的。在这里您可以存储许可证数据:
Now it's a game between you and crackers. They'll win, always. You'll only make life of legitimate users more hard so read cum grano salis. Where you may store license data:
注册。优点:容易做到。缺点:容易开裂和低权限的用户是只适用于每一次一个用户。注册表键(每用户群)可以以某种方式的隐藏的,如果它有 0
在其名称。看看到this好贴。
文件。优点:容易做到和海事组织一点比登记更安全。缺点:容易破解(但可以将其隐藏更多,见后)
应用程序本身(数据附加到你的可执行文件,一些有关的字this帖子)。优点:很难检测到。缺点:防病毒可能会认为这是...病毒和应用程序更新可能会删除许可证太(当然,如果你不处理这种情况正常),所以它会让你的code和部署更为复杂
Registry. Pro: easy to do. Cons: easy to crack and for low privileges user it's valid only for one user per time. A registry key (in a per-user base) can be somehow hidden if it has