Timestamp and encrypt the date of installation somewhere safe(registry or an external encrypted file)
Upon each run, validate the registry date as well as the system date.
User may tamper with system date/time; so you may would want to validate the system date/time wrt previous run date/time, and plan you app's actions accordingly.
Show the app-dormant error message upon currentDate - installationDate > 30, and provide a link to your online registration page.
You may also require to:
Develop a keygen(key encryptor) that would generate(a hash out of a certain key) the serial key.
Add the key decrytor in your product that, upon getting the key from user input, would try to generate the same(hash?) key and compare that hash with your decryptor algo.
Checkout this and this that uses SerialNumberTemplate to get serial number during installation.
--EDIT--
You can note the time either from:
The date of installation: Create a Custom Action in your visual studio setup project; and add registry item in Install override method.
The date from first-run: Use DateTime.Now.Date to get the current date and encrypt/save it somewhere, probably registry.
发布评论
评论(2)
可能有几种可能性:
您可能还需要:
密钥加密器
),它将生成(某个密钥的哈希值)序列密钥。密钥解密器
,从用户输入获取密钥后,它会尝试
生成相同的(哈希?)密钥并将该哈希与您的解密器算法进行比较。查看此和此 使用
SerialNumberTemplate
在安装过程中获取序列号。--编辑--
您可以从以下位置记下时间:
Install
覆盖方法中添加注册表项。DateTime.Now.Date
获取当前日期并将其加密/保存在某处,可能是注册表。There could be several possibilities:
You may also require to:
key encryptor
) that would generate(a hash out of a certain key) the serial key.key decrytor
in your product that, upon getting the key from user input, wouldtry
to generate the same(hash?) key and compare that hash with your decryptor algo.Checkout this and this that uses
SerialNumberTemplate
to get serial number during installation.--EDIT--
You can note the time either from:
Install
override method.DateTime.Now.Date
to get the current date and encrypt/save it somewhere, probably registry.虽然我没有看到与专利的联系,但这很简单:
Although I don't see the connection to patents it's as easy as that: