使用Serial键设置Windows应用程序,仅允许特定数量的pc。 [英] Make Setup of Windows Application with Serial key allowing only for specific number of pc.

查看:54
本文介绍了使用Serial键设置Windows应用程序,仅允许特定数量的pc。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个Windows应用程序。我想为它创建一个设置,允许客户端安装在特定数量的pc(例如: - 2 pc)和有限的时间内,即1年或甚至说应该能够在评估期间进行。我正在使用高级安装程序来创建设置,但我不知道如何执行此操作。如果有可能在高级安装程序中,请告诉我,如果有任何其他解决方案可用,请帮助我。



在此先感谢!!!

解决方案

这是一个开始...

  public   class  ProductKey 
{
private static DateTime endDate,startDate;
public ProductKey()
{

}
public ProductKey(DateTime startDate)
{
StartDate = startDate;
}
public ProductKey(DateTime startDate,DateTime endDate)
{
StartDate = startDate;
EndDate = endDate;
}
public ProductKey(DateTime startDate,DateTime endDate, string [] keyParts )
{
StartDate = startDate;
EndDate = endDate;
KeyParts = keyParts;
}
public ProductKey( string [] keyParts)
{
KeyParts = keyParts;
}
public string [] KeyParts
{
get ;
set ;
}
public DateTime StartDate
{
get
{
return startDate;
}
set
{
startDate = value ;
}
}
public DateTime EndDate
{
获取
{
return endDate;
}
set
{
endDate = value ;
}
}
public int DaysRemaining
{
get
{
if (startDate!= null && endDate!= null
return endDate.Subtract(startDate).Days;
else
return 0 < /跨度>;
}
set
{
endDate = startDate.Add( new TimeSpan( value 0 0 < /跨度>));
}
}
}


如果没有跟踪安装的在线服务,几乎不可能限制数量仅基于产品密钥的安装。



您应该阅读Advanced Installer的文档,它允许您编写自定义DLL,以便在安装的许可过程中使用

I have developed a windows application. I want to create setup for it which will allow the client to install in specific number of pc's (eg :- 2 pc's) and for limited period i.e. 1 yr or even say should be able to make it for evaluation period. I am using advanced installer for creating setup, but I don't know how to do this. If it possible in advanced installer then please let me know, also if any other solution is available, Please help me.

Thanks in Advance !!!

解决方案

Here's a start...

public class ProductKey
    {
        private static DateTime endDate,startDate;
        public ProductKey()
        {

        }
        public ProductKey(DateTime startDate)
        {
            StartDate = startDate;
        }
        public ProductKey(DateTime startDate, DateTime endDate)
        {
            StartDate = startDate;
            EndDate = endDate;
        }
        public ProductKey(DateTime startDate, DateTime endDate,string[] keyParts)
        {
            StartDate = startDate;
            EndDate = endDate;
            KeyParts = keyParts;
        }
        public ProductKey(string[] keyParts)
        {
            KeyParts = keyParts;
        }
        public string[] KeyParts
        {
            get;
            set;
        }
        public DateTime StartDate
        {
            get
            {
                return startDate;
            }
            set
            {
                startDate = value;
            }
        }
        public DateTime EndDate
        {
            get
            {
                return endDate;
            }
            set
            {
                endDate = value;
            }
        }
        public int DaysRemaining
        {
                get
                {
                    if (startDate != null && endDate != null)
                        return endDate.Subtract(startDate).Days;
                    else
                        return 0;
                }
                set
                {
                    endDate = startDate.Add(new TimeSpan(value, 0, 0));
                }
        }
    }


Without having an online service that tracks installs, its pretty much impossible to limit the number of installs based on product key alone.

You should read through the documentation for Advanced Installer, it allows you to write custom DLL's for use during the licensing process of the install.


这篇关于使用Serial键设置Windows应用程序,仅允许特定数量的pc。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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