如何在C#中设置软件的到期时间 [英] How to Set Expiration of software in C#

查看:1094
本文介绍了如何在C#中设置软件的到期时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2008和数据库sql server 2005中开发了一个项目.我的问题是,当客户端安装安装程序时,该项目将在1年后过期.
我该如何设置?
请帮助我!

I am developed a project in Visual studio 2008 and database sql server 2005.My question is when client install a setup,the project will expire after 1 year.
How i can set this?
Plz help me!

推荐答案

如果要使应用程序过期,应在CodeProject上查看此文章.

应用程序试用版 [
If you want to make your application to expire you should check this article on CodeProject.

Application Trial Maker[^]


您可以为此使用注册表.当应用程序首次安装或加载时,请检查您在应用程序中定义的计算机注册表中的特定注册表项.如果注册表项不存在,请将值设置为当前日期.每次加载应用程序时,请检查此注册表项的值.如果不到一年,请继续执行该应用程序,否则向用户显示该消息.

希望对您有所帮助!
You can use Registry for this purpose. When the application installs or loads for the first time check for a specific registry Key in computer''s registry that you define in your application. If the registry key does not exist, set the value to current date. Every time when your application loads, check for the value of this registry key. If it is less than one year, proceed with the application else display the message to user.

Hope it helps!


您好,

请在下面的讨论中查看我的答案.

试用版安全问题 [
Hi,

Please see my Answer in below discussion.

Trial Version security problem[^]

Thanks


这篇关于如何在C#中设置软件的到期时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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