Expiry date for demo product
Hi,
I want to give a demo version of my product to the user, which should be expired after 2 months from the date of installation. Without comapring the system date, how can I do this? any idea??
( I beleive the system date is changebale, so if the user change the system date, my product will not get crash after 2 months !! :p am i right???) ;)
Thanks..
Re: Expiry date for demo product
Hi
I Posted this thread, long back. There is no reply. Pls try to help me on this.... :wave:
Re: Expiry date for demo product
You would need to limit the number of uses as well as the time. That way, even if they keep putting their clock back the demo will still expire. You might want to hide a reference to the number of uses in the Registry, perhaps encrypted, to make it difficult to tamper with. There are products available that will handle this stuff for you. They have various levels of cost and functionality.
Re: Expiry date for demo product
So, what u mean is , I need to put a counter for the no. of time, the user using the product....Isn't it?
Re: Expiry date for demo product
That's correct. I've encountered a great number of demos that do just that.
Re: Expiry date for demo product
Re: Expiry date for demo product
Quote:
Originally Posted by jmcilhinney
That's correct. I've encountered a great number of demos that do just that.
Got any product names or links?
Re: Expiry date for demo product
Quote:
Originally Posted by mendhak
Got any product names or links?
I wonder how you could have never seen a demo project at all.
just go to adobe.com,macromedia.com or sony.com.
Download any of their trial softwares.They only work for a certain number of times/certain number of days.:)
C'mon,this is so silly,i know...but,what you asked sounds like this is what you asked...or am i misunderstanding your question? :)
Re: Expiry date for demo product
You're misunderstanding the question. :)
I'm looking to implement that functionality in a program, not see it in action.
Re: Expiry date for demo product
ok,here,I just quickly made up a small program to show you..:)..Here,Im storing onto a file everytime the program loads.In this example,the program is allowed to run only 3 times.Its checking if the program is run more than 3 times.If it exceeds 3 times,then,the trial period ends.Well,yes,Its easy to crack it,but,only if they knew the file where im storing on and stuff. :) I guess almost all softwares today are cracked that ways.
VB Code:
Dim filenumber As Integer
Dim times_used As Integer = 1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
filenumber = FreeFile()
If IO.File.Exists(Application.StartupPath & "\check.myext") Then
FileOpen(filenumber, Application.StartupPath & "\check.myext", OpenMode.Random, OpenAccess.ReadWrite)
FileGet(filenumber, times_used)
MsgBox("You have executed this software " & (times_used) & " times")
FileClose(filenumber)
If times_used >= 3 Then
MsgBox("Sorry,Your trial period is over!!")
Application.Exit()
End If
times_used = times_used + 1
FileOpen(filenumber, Application.StartupPath & "\check.myext", OpenMode.Random, OpenAccess.ReadWrite)
FilePut(filenumber, times_used)
Else
FileOpen(filenumber, Application.StartupPath & "\check.myext", OpenMode.Random, OpenAccess.ReadWrite)
FilePut(filenumber, times_used)
End If
End Sub
If this is really that helpful,please tell me so that Ill put a copy in that forum where they submit code :) Thanks..oh yeah,i wont forget the comments too if im putting there :D
Hope this helps...
Re: Expiry date for demo product
Another method would be to store the value on to the registry as Jm said :)
You can change the name and the myext to your extension in the above program and store the file somewhereee hidden so that the user wont find it.Encrypt it..hmm...do anything you want with it..lol..i have no idea what else you can do with it to prevent crackers from cracking it ;) but,theyve cracked every software that exists.Even windows has been cracked...lol...is there anything they havent cracked in that way? The only thing you can do is modify the file hide it in different places in different versions :) or there might be some nice way...someone can help for that :)
Re: Expiry date for demo product
Heres my ugly commented neat proggy : Made it a function and easier to read and use
VB Code:
Dim filenumber As Integer 'This is a variable were delcaring to get in the value of freefile function.It assigns automatically the value which represents the file
Dim times_used As Integer = 1 'here,our program sets how many times used so far..were initializing it here
Dim max_limit As Integer = 5 'Set the maximum number of times he can use here..
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
demosoft()
End Sub
Private Sub demosoft()
filenumber = FreeFile() 'We assign the number which represents which file to open
If IO.File.Exists(Application.StartupPath & "\check.myext") Then 'Checking if file exists..
FileOpen(filenumber, Application.StartupPath & "\check.myext", OpenMode.Random, OpenAccess.ReadWrite) 'If exists,were opening it in readwrite mode.
FileGet(filenumber, times_used) 'Were reading from the file the value thats stored..ie the number of times he has used
MsgBox("You have executed this software " & (times_used) & " times") 'hmmm,were displaying it here..:)
FileClose(filenumber) 'Lets close the file now.
If times_used >= max_limit Then 'Were checking if the user has used the software more than the limit specified
MsgBox("Sorry,Your trial period is over!!Please purchase this software ;-) ") 'oops,if it has exceeded,then,he cant use it :p ;)
Application.Exit() 'Say Goodbye to the user..cos,he needs to purchase..We exit our app here.
End If
times_used = times_used + 1 'if he has used it once before,lets make it 2 now since this is the 2nd time
FileOpen(filenumber, Application.StartupPath & "\check.myext", OpenMode.Random, OpenAccess.ReadWrite) 'storing the value back here :)
FilePut(filenumber, times_used)
Else
'This part is if the user is using the software for the 1st time.The file has to be created
FileOpen(filenumber, Application.StartupPath & "\check.myext", OpenMode.Random, OpenAccess.ReadWrite)
FilePut(filenumber, times_used) 'ok,now he has opened and used once,so,lets write it in here.
End If
End Sub
Re: Expiry date for demo product
hmmm, I have some little experience with this one..which most of my projects has a database included, either you can use a windows registry put some date or number of uses there, encrypt it or whatever you want...
But sometimes I made it so simple. made some variables like
Public glDemo Const = True
Public gnMaxRecord = 15
then compile it, make a package & deployment and deliver the CD to the client. Trapping it in the recordcount...
The catch is, you want your client to like you software so you gave them all functionality there but it has something like this on every transactions or record added
If glDemo Then
If rsTable.RecordCount = gnMaxRecord Then
Msgbox ("Maximum record reached for DemoVersion.Please purchase this software")
Exit Sub
End If
End If
Have a nice day. ;)