Results 1 to 4 of 4

Thread: How to make trial version ??[RESOLVED]

  1. #1

    Thread Starter
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    How to make trial version ??[RESOLVED]

    Hi,

    I want to make a 5 day trial version of my application, means my application deletes itself or stop running after 5 days from installation.

    Thanx
    Last edited by usamaalam; Jan 9th, 2003 at 01:37 PM.

  2. #2
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    Europe
    Posts
    289
    Check out aspack.com. They have the best tools on the net for just what you want to achieve and more.

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Tip :
    Create a key in the reg or encrypted file . Whenever the application is run , do the following :
    1-Check stored value , If it reaches the number you set then exit the application .
    Otherwise
    2-Add 1 value to the previous value .

  4. #4
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    Here is a simple protection sample. should get you started

    VB Code:
    1. 'Author: Reginald Wheat
    2.  
    3. Option Explicit
    4.  
    5. Public Function DateGood(NumDays As Integer) As Boolean
    6.     'The purpose of this module is to allow you to place a time
    7.     'limit on the unregistered use of your shareware application.
    8.     'This module can not be defeated by rolling back the system clock.
    9.     'Simply call the DateGood function when your application is first
    10.     'loading, passing it the number of days it can be used without
    11.     'registering.
    12.     '
    13.     'Ex: If DateGood(30)=False Then
    14.     ' CrippleApplication
    15.     ' End if
    16.     'Register Parameters:
    17.     ' CRD: Current Run Date
    18.     ' LRD: Last Run Date
    19.     ' FRD: First Run Date
    20.  
    21.     Dim TmpCRD As Date
    22.     Dim TmpLRD As Date
    23.     Dim TmpFRD As Date
    24.  
    25.     TmpCRD = Format(Now, "m/d/yy")
    26.     TmpLRD = GetSetting(App.EXEName, "Param", "LRD", "1/1/2000")
    27.     TmpFRD = GetSetting(App.EXEName, "Param", "FRD", "1/1/2000")
    28.     DateGood = False
    29.  
    30.     'If this is the applications first load, write initial settings
    31.     'to the register
    32.     If TmpLRD = "1/1/2000" Then
    33.         SaveSetting App.EXEName, "Param", "LRD", TmpCRD
    34.         SaveSetting App.EXEName, "Param", "FRD", TmpCRD
    35.     End If
    36.     'Read LRD and FRD from register
    37.     TmpLRD = GetSetting(App.EXEName, "Param", "LRD", "1/1/2000")
    38.     TmpFRD = GetSetting(App.EXEName, "Param", "FRD", "1/1/2000")
    39.  
    40.     If TmpFRD > TmpCRD Then 'System clock rolled back
    41.         DateGood = False
    42.     ElseIf Now > DateAdd("d", NumDays, TmpFRD) Then 'Expiration expired
    43.         DateGood = False
    44.     ElseIf TmpCRD > TmpLRD Then 'Everything OK write New LRD date
    45.         SaveSetting App.EXEName, "Param", "LRD", TmpCRD
    46.         DateGood = True
    47.     ElseIf TmpCRD = Format(TmpLRD, "m/d/yy") Then
    48.         DateGood = True
    49.     Else
    50.         DateGood = False
    51.     End If
    52. End Function
    53.  
    54.  
    55. 'Usage
    56.  
    57.  Private Sub Form_Activate()
    58.     If Not DateGood(30) Then
    59.         MsgBox "Trial Period Expired!", vbExclamation, "Unregistered application"
    60.         Unload Me
    61.     End If
    62. End Sub
    -= a peet post =-

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