如何保护我的许可证免于更改日期? [英] How to protect my license from Date change?

查看:152
本文介绍了如何保护我的许可证免于更改日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个带有到期日期(安装程序后100天)的c#程序.
代码是:

I made a c# program with an expiration date (100 days after the program is installed)
the code is:

DateTime today = DateTime.Today;
DateTime Expiration = today.AddDays(100)

;

但是,如果购买我程序的用户将计算机的日期更改为以前的日期,则该许可证将永远有效
您有解决此问题的建议吗?
谢谢,

;

but if the user who bought my program changed his computer''s date to a previous time ... the license will be valid forever
Do you have any suggestions to solve this problem???
thanks,

推荐答案

保存每次运行程序的日期.然后,您可以对照今天的日期检查上次运行的日期.如果今天的日期等于/早于上次运行的日期,请不要运行该软件.

您如何实施类似的操作取决于您自己.
Save the date every time the program is run. Then you can check the date it was last run against today''s date. If today''s date is equal to/earlier than the last date run, don''t let the software run.

How you implement something like that is up to you.


您还可以在网络上查看时间.
You can also check the time on the web.


这篇关于如何保护我的许可证免于更改日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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