Time limted software and unlock code
I want to distrbute my program in trial version with 15 days validity and then send the unlock code to buyer if he purchases. Is there any freeware to allow me the unlock code to be incorporated. The freeware programs I am getting is good enough to time limit the software but not for providing unlock code.
Re: Time limted software and unlock code
Re: Time limted software and unlock code
I have an idea to get things simple.
1) I get the computer ID from the purchaser.
2) Then in the original program's form load event I incorporate a code for detecting the comuter ID and get it checked against the one provided by the purchaser. If it matches the rest of the program gets executed, otherwise it ends with a message.
3) Then I make an exe and send it to my purchaser and it will be working only on his machine.
By the way what is the code for getting the computer ID ?
I understand that hackers can crack the exe, but I am not concentrating too much on that. May be some more encryption on the exe will increase security. I expect your comments.
Amit Bbhaduir
Re: Time limted software and unlock code
Use the link given above, I beleive NSLOCK does that all to the best of my Knowledge.
Re: Time limted software and unlock code
from the code bank
VB Code:
Private str As String
Private str1 As String
Private str2 As String
Private initialDate As Date
Private expDate As Date
Private usedDate As Date
Private Expire As Boolean
Sub Main()
Call Expire_Project
End Sum
Public Sub Expire_Project()
str = GetSetting("Project Name", "Expiry", "Initial Date")
'First Get the Value from the Registry
If Len(Trim(str)) < 1 Then
'If the Registry Value is not set then Set the Value
SaveSetting "Project Name", "Expiry", "Initial Date", Date
expDate = DateAdd("d", 15, Date)
'Add 15 days to the Current Date
SaveSetting "Project Name", "Expiry", "Expiry Date", expDate
'Here I have Given 15 days for expiration of the Software You can Give 'n' no of days as you like
Else
str1 = GetSetting("Project Name", "Expiry", "Used Date")
'If this Registry Value is not Set then
If Len(Trim(str1)) < 1 Then
str = GetSetting("Project Name", "Expiry", "Initial Date")
'Get the Previously set Initial Value from the Registry
initialDate = CDate(str)
str2 = GetSetting("Project Name", "Expiry", "Expiry Date")
'Get the Expiry Value from the Registry
expDate = CDate(str2)
If Date > expDate Or Date < initialDate Then
'Compare Registry Values with the Date, if they are bound with in the Initial Value of the Software and Expiry Value of the SOftware then only the Program will run
SaveSetting "Project Name", "Expiry", "Used Date", "True" 'Now set the Used Date value to True
MsgBox "Software Has Been Expired; You cannot run the Software by Setting the Date Backwards", vbExclamation, "Software Expired"
Expire = True
Exit Sub
End If
Else
MsgBox "Software Has Been Expired; You cannot run the Software by Setting the Date Backwards", vbExclamation, "Software Expired"
Expire = True
Exit Sub
End If
End If
End Sub--------------------------------------------------------------------------------