|
-
Jan 1st, 2003, 03:54 PM
#1
Thread Starter
Frenzied Member
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.
-
Jan 1st, 2003, 04:02 PM
#2
Hyperactive Member
Check out aspack.com. They have the best tools on the net for just what you want to achieve and more.
-
Jan 1st, 2003, 05:23 PM
#3
Sleep mode
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 .
-
Jan 1st, 2003, 06:46 PM
#4
-= B u g S l a y e r =-
Here is a simple protection sample. should get you started 
VB Code:
'Author: Reginald Wheat
Option Explicit
Public Function DateGood(NumDays As Integer) As Boolean
'The purpose of this module is to allow you to place a time
'limit on the unregistered use of your shareware application.
'This module can not be defeated by rolling back the system clock.
'Simply call the DateGood function when your application is first
'loading, passing it the number of days it can be used without
'registering.
'
'Ex: If DateGood(30)=False Then
' CrippleApplication
' End if
'Register Parameters:
' CRD: Current Run Date
' LRD: Last Run Date
' FRD: First Run Date
Dim TmpCRD As Date
Dim TmpLRD As Date
Dim TmpFRD As Date
TmpCRD = Format(Now, "m/d/yy")
TmpLRD = GetSetting(App.EXEName, "Param", "LRD", "1/1/2000")
TmpFRD = GetSetting(App.EXEName, "Param", "FRD", "1/1/2000")
DateGood = False
'If this is the applications first load, write initial settings
'to the register
If TmpLRD = "1/1/2000" Then
SaveSetting App.EXEName, "Param", "LRD", TmpCRD
SaveSetting App.EXEName, "Param", "FRD", TmpCRD
End If
'Read LRD and FRD from register
TmpLRD = GetSetting(App.EXEName, "Param", "LRD", "1/1/2000")
TmpFRD = GetSetting(App.EXEName, "Param", "FRD", "1/1/2000")
If TmpFRD > TmpCRD Then 'System clock rolled back
DateGood = False
ElseIf Now > DateAdd("d", NumDays, TmpFRD) Then 'Expiration expired
DateGood = False
ElseIf TmpCRD > TmpLRD Then 'Everything OK write New LRD date
SaveSetting App.EXEName, "Param", "LRD", TmpCRD
DateGood = True
ElseIf TmpCRD = Format(TmpLRD, "m/d/yy") Then
DateGood = True
Else
DateGood = False
End If
End Function
'Usage
Private Sub Form_Activate()
If Not DateGood(30) Then
MsgBox "Trial Period Expired!", vbExclamation, "Unregistered application"
Unload Me
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|