Results 1 to 5 of 5

Thread: Time limted software and unlock code

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    11

    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.

  2. #2
    Hyperactive Member
    Join Date
    Sep 2006
    Posts
    352

    Re: Time limted software and unlock code

    Hit the link below and good luck.
    http://www.vbforums.com/showthread.p...ghlight=NSLOCK

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    11

    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

  4. #4
    Hyperactive Member
    Join Date
    Sep 2006
    Posts
    352

    Re: Time limted software and unlock code

    Use the link given above, I beleive NSLOCK does that all to the best of my Knowledge.

  5. #5
    Fanatic Member newprogram's Avatar
    Join Date
    Apr 2006
    Location
    in your basement
    Posts
    769

    Re: Time limted software and unlock code

    from the code bank
    VB Code:
    1. Private str As String
    2. Private str1 As String
    3. Private str2 As String
    4. Private initialDate As Date
    5. Private expDate As Date
    6. Private usedDate As Date
    7. Private Expire As Boolean
    8.  
    9. Sub Main()
    10.     Call Expire_Project
    11. End Sum
    12.  
    13.  
    14. Public Sub Expire_Project()
    15. str = GetSetting("Project Name", "Expiry", "Initial Date")
    16. 'First Get the Value from the Registry
    17.  
    18. If Len(Trim(str)) < 1 Then
    19. 'If the Registry Value is not set then Set the Value
    20.     SaveSetting "Project Name", "Expiry", "Initial Date", Date
    21.     expDate = DateAdd("d", 15, Date)
    22.     'Add 15 days to the Current Date
    23.     SaveSetting "Project Name", "Expiry", "Expiry Date", expDate
    24.     'Here I have Given 15 days for expiration of the Software You can Give 'n' no of days as you like
    25. Else
    26.     str1 = GetSetting("Project Name", "Expiry", "Used Date")
    27.     'If this Registry Value is not Set then
    28.     If Len(Trim(str1)) < 1 Then
    29.         str = GetSetting("Project Name", "Expiry", "Initial Date")
    30.         'Get the Previously set Initial Value from the Registry
    31.         initialDate = CDate(str)
    32.         str2 = GetSetting("Project Name", "Expiry", "Expiry Date")
    33.         'Get the Expiry Value from the Registry
    34.         expDate = CDate(str2)
    35.             If Date > expDate Or Date < initialDate Then
    36.             '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
    37.                 SaveSetting "Project Name", "Expiry", "Used Date", "True" 'Now set the Used Date value to True
    38.                 MsgBox "Software Has Been Expired; You cannot run the Software by Setting the Date Backwards", vbExclamation, "Software Expired"
    39.                 Expire = True
    40.                 Exit Sub
    41.             End If
    42.         Else
    43.             MsgBox "Software Has Been Expired; You cannot run the Software by Setting the Date Backwards", vbExclamation, "Software Expired"
    44.             Expire = True
    45.             Exit Sub
    46.         End If
    47. End If
    48. End Sub--------------------------------------------------------------------------------
    Live life to the fullest!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width