6 Replies - 4190 Views - Last Post: 11 July 2011 - 11:04 PM Rate Topic: -----

#1 339935  Icon User is offline

  • New D.I.C Head

Reputation: -3
  • View blog
  • Posts: 38
  • Joined: 05-September 10

Making trial programs...

Posted 18 November 2010 - 02:22 AM

How do programs like antivirus keep track of time passed for the trial period?

Eg I want to make a program that expires and stop working in 30 days

One way I thought of is to make use of the system time.

But the system time can be changed.

Any ideas,?
Is This A Good Question/Topic? 0
  • +

Replies To: Making trial programs...

#2 John-Ellis  Icon User is offline

  • D.I.C Regular

Reputation: 7
  • View blog
  • Posts: 305
  • Joined: 23-March 10

Re: Making trial programs...

Posted 19 November 2010 - 06:43 AM

View Post339935, on 18 November 2010 - 01:22 AM, said:

How do programs like antivirus keep track of time passed for the trial period?

Eg I want to make a program that expires and stop working in 30 days

One way I thought of is to make use of the system time.

But the system time can be changed.

Any ideas,?


Hi,

Cant it be done when you are deploying the application, is there a setting you can change so when the application has been used for 30 days it asks for a license key???

also - just been looking on google, please see this piece of code,

Option Explicit 

Private Const TRIAL_PERIOD_DAYS As Integer = 30 

Private Function TrialPeriodDaysLeft(DaysTrial As Integer) As Integer 
Dim DateStart As Date 

DateStart = GetSetting(App.Title, "Trial Period", "Date Start", 0) 
If DateStart = 0 Then 
   SaveSetting App.Title, "Trial Period", "Date Start", Date 
Else 
   TrialPeriodDaysLeft = DateDiff("d", DateStart, Date) > DaysTrial 
End If 
End Function 

Private Sub AppSetRegistered(Registered As Boolean) 
SaveSetting App.Title, "Trial Period", "Registered", Registered 
End Sub 

Private Function AppRegistered() As Boolean 
AppRegistered = GetSetting(App.Title, "Trial Period", "Registered", False) 
End Function 

Private Sub Form_Load() 
If Not AppRegistered Then 
   Dim DaysLeft As Integer 
    
   DaysLeft = TrialPeriodDaysLeft(TRIAL_PERIOD_DAYS) 
   If DaysLeft < 0 Then 
       If MsgBox("The trial period for " & App.Title & " has expired." & vbCrLf & _ 
         "Would you like to register to continue using this program?", vbQuestion + vbYesNo) = vbYes Then 
           ' Open up order form here 
           ' Use: 'AppSetRegistered True' to register program 
       Else 
           ' Exit your program here 
       End If 
   Else 
       MsgBox "You have " & DaysLeft & " " & IIf(DaysLeft = 1, "day left", "days left") & " to use this program.", vbInformation 
   End If 
End If 
End Sub



this allows the program to check whether a trial period of any length has expired, notifying the user how many days are left. The user is given the option to register the program or just not use it any more. It uses the VB registry setting functions.

Hope this helps

Cheers

John

This post has been edited by John-Ellis: 19 November 2010 - 06:49 AM

Was This Post Helpful? 0
  • +
  • -

#3 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 458
  • View blog
  • Posts: 4,222
  • Joined: 25-March 09

Re: Making trial programs...

Posted 19 November 2010 - 07:35 AM

@339935 Since almost everything use system time you may want to reconsider your trail program. instead of locking it down in a trail period of time why dont you just lock some of the features and unlock them if the user buy the program?

the other question remain how to make your algorithm to your key and most of all how to combine it with something unique on the user PC so you can be sure this key will be used only on this PC

This post has been edited by NoBrain: 19 November 2010 - 07:38 AM

Was This Post Helpful? 0
  • +
  • -

#4 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 959
  • View blog
  • Posts: 3,688
  • Joined: 02-July 08

Re: Making trial programs...

Posted 19 November 2010 - 07:54 AM

There are third party professional options that handle the computer the software is installed on and how to handle when the client needs to transfer this to a diff computer when you sell the program by the number of computers they will run it on. And the trial part is easy enough too most use a number of uses or date option.
Was This Post Helpful? 1
  • +
  • -

#5 cry1978  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 12-January 06

Re: Making trial programs...

Posted 11 July 2011 - 10:04 PM

I don't know if this will work but this is a thought, how about making it from the date that it was registered? or using your own websites system date? instead of the users?

I need all the codes for your whole script to come up with a solution?

is this connected to your website in any way?

I don't see where you have setup license keys for your software, is this the whole script?

all be glad to help out if I knew what this is supposed to do, and if it was connected to a website for validating keys.

you can make your key systems on your website and then have a validating form in visual basic to check user keys.
Was This Post Helpful? 0
  • +
  • -

#6 cry1978  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 12-January 06

Re: Making trial programs...

Posted 11 July 2011 - 10:14 PM

in that script above, how about letting the user have an option to enter a license key?

this license key can be tracked online, using an online activation system, validating user keys if they have bought it? you need this option most importantly.
Was This Post Helpful? 0
  • +
  • -

#7 smohd  Icon User is offline

  • Critical Section
  • member icon



Reputation: 1746
  • View blog
  • Posts: 4,409
  • Joined: 14-March 10

Re: Making trial programs...

Posted 11 July 2011 - 11:04 PM

Of course as said, this mostly will require third party tools instead of those build in: But to start, you may start here:
http://www.dreaminco...1-trial-period/
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1