如何在我的应用程序上设置到期日期 [英] how to set expiry date on my application

查看:73
本文介绍了如何在我的应用程序上设置到期日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2008和sql server 2005上开发了一个项目.我的问题是,当用户安装软件时,该软件将在1年后卸载,而软件将在一个系统中仅安装一次?
请帮助我!

I am developed a project on visual studio 2008 And sql server 2005.My question is when user install a software the software will uninstall after 1 year and software will install only once in one system?
plz help me!

推荐答案

您需要在安装软件时在注册表中设置信息,并在启动时查询该信息以检查是否过期.

若要确保仅安装一次该应用程序,请使用该计算机的计算机名称或cpuId创建一个唯一密钥(以便每台计算机都有一个唯一密钥),然后将其设置在具有加密功能的注册表位置.安装应用程序后,请根据计算机名称计算该密钥,然后在注册表中检查该密钥.
you need to set the information in the registry when the software is being installed and poll that information on start up to check expiry.

To make sure that the application is installed only once, create a unique key using the computer name or cpuId of that computer (so that each computer will have a unique key) and set it in a registry location with encryption. When the application is being installed, calculate that key basd on the computer name and check the registry for that key.



我认为您需要在首次安装时以及可能在每次启动应用程序时在注册表中添加安装信息(日期等).您需要将其与当前日期进行比较,然后决定要怎么做.在卸载期间,只需保留该信息,然后在重新安装时再次检查即可.如果相差超过一年,请不要安装.
加密安装信息以确保安全.
I think you need to add installation info (Date etc...) in registry at first installation and probably at each start up of application you need to compare with current date and decide what to do. During uninstallation just leave that info and check again while reinstallation. If the difference is more than a year, don''t install.
Encrypt the installation info for security.


这篇关于如何在我的应用程序上设置到期日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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