演示版? [英] Demo version?

查看:48
本文介绍了演示版?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好...我刚刚为我的一个朋友完成了一个小项目,在课堂上炫耀.

但是事实是,该应用程序CD将保留在他的导师手中,我不希望他能够多次使用该应用程序..因为我打算继续为自己工作和开发该项目.
我不需要任何花哨的东西...就像一个简单的演示版一样..我考虑过设置使用期限..或者也许是一个使用计数器,以限制应用程序运行超过3个4次.

也许与注册表一起工作?但是如何?
如果您有任何想法,我想知道.谢谢.




好的,所以我尝试使用注册表.我在CurrentMachine下的某个地方(如果它不存在)创建一个密钥.如果存在,则每次启动该应用程序时,都会检查该值,如果通过检查,则将对其进行修改.

现在的问题是,即使使用的密钥在CurrentMachine下,我也无法让它仅对管理员有效,但它不能用于简单的用户.

使用当前用户不是一种选择,因为这意味着事前.在任何其他用户帐户上,该应用都可以再次运行.
有解决方案吗?


EDIT

Hey guys...I''ve just finished work on a small project for a friend of mine, to show off in class.

But the fact is, the app cd will remain with his tutor, and I don''t want him to be able to use the app more than a few times.. Because I intend to keep working and developing this project for myself.
I don''t want anything fancy...Just something like a simple demo version..I thought about setting a time limit for it''s use..or maybe a usage counter to limit the app from running more than 3-4 times.

Maybe working with the registry? But how?
If you have any ideas, I''d like to know. Thanks.




OK, So I''ve tried using the registry..I create a key somewhere in there, under CurrentMachine (if it does not exist). If it exists, then everytime the app is launched, the value is checked and, if it passes the check, it is modified.

The problem now is that even if the key used is under CurrentMachine, I can''t get it to work for a simple user, just for an admin.

Using current user is not an option, because that would mean for ex. on any other user account, the app could be run again.
Any solutions?


EDIT

推荐答案

好,您可以使用注册表,但是至少您应该加密使用计数器.

Well, you may use the registry, but at least you should encrypt the usage counter.

galextudor写道:
galextudor wrote:

现在的问题是,即使使用的密钥在CurrentMachine下,我也无法使它适用于简单的用户,仅供管理员使用.

The problem now is that even if the key used is under CurrentMachine, I can''t get it to work for a simple user, just for an admin.


为什么不改用HKEY_CURRENT_USER?
:)


Why don''t you use HKEY_CURRENT_USER instead?
:)


您可以保存加密的计数器
也可以在已安装的settings.bin文件中...:)
You could hold your encrypted counter
in an installed settings.bin file too... :)


您可以在程序开头附近添加一行,以检查当前日期,以及当前日期是否在该日期之后.您已经预定义了,那么它将关闭程序.
You could add a line near the begining of your program that checks the current date and if the current date is after a date that you have predefined, then it would close the program.


这篇关于演示版?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆