Hi VB Experts again;
How can I set my VB6 application accessable to run just for one week as prototype application, after that it will prompt the user to ask for a password sort of....?
Thank you
M C Benzerari
Printable View
Hi VB Experts again;
How can I set my VB6 application accessable to run just for one week as prototype application, after that it will prompt the user to ask for a password sort of....?
Thank you
M C Benzerari
There are many different ways including some "hidden" file, registry but general idea is that you need to write start date (it could also be encrypted) and check difference in days on every launch.
I've seen commercial apps allowing 15 launches (not even days). :)
You can also take the approach of distributing an app that only allows for limited functionality until the user registers. If you're interested in that approach then see the A program registration scheme link in my signature.
Quote:
Originally Posted by RhinoBull
That ia a good idea, what is the VB6 code of that?
Thank you:wave:
I don't suppose you don't know how to write to a file? :confused:
You still did not show me What is the VB code of that 10 or 15 lunches, you do not need to suppose:wave:Quote:
Originally Posted by RhinoBull
Wow... I wasn't planning doing that though - that is a very basic stuff. ;)
Anyway, you can have something a s simple as these few lines:
Code:
'NOTE: place this code to your startup form or Sub Main instead if you use that
Private Sub Form_Load()
Dim iCounter As Integer
iCounter = CInt(GetSetting(App.EXEName, "trial", "count", 0))
iCounter = iCounter + 1
If iCounter < 16 Then
SaveSetting App.EXEName, "trial", "count", iCounter
Else
MsgBox "The trial period is expired." & _
vbNewLine & _
"If you wish to continue to use this software you must purchase it."
End
End If
End Sub
Thank you for your reply, I will try your code and let you know.Quote:
Originally Posted by RhinoBull
Wow:wave:
Yes! your code worked OK and thank you very much for your help.:wave:
No problem. Just keep in mnd that that is a very basic and weak approach - anyone who's more or less computer literal can break that quite easy.
So, you may try to change those hardcoded values (App.EXEName, "trial", "count") to something less obvious at least.
I used that code also, and it worked fine, but it also displayed runtime error 91 for some reason...Quote:
Originally Posted by RhinoBull
What you mean by that?Quote:
Originally Posted by RhinoBull
What he means is that someone could open the registry go to the node and change the value from 15 back to 1 and gets to use the app again.
Exactly! So as I said you can at least change the obvious text to something that makes sense only to you - perhaps like this:Quote:
Originally Posted by GaryMazzone
... or something of that nature ... :)Code:iCounter = CInt(GetSetting("a897", "jem099", "gtzxl", 0))
'...
SaveSetting "a897", "jem099", "gtzxl", iCounter
And/or encrypt the 0 to 15 value and code the program in such a way that if there's no registry entry it won't run.
the application is just a *.Exe sort of I am not going to give my source code, so how can some else access my source code, make a change on it then make .exe copy?Quote:
Originally Posted by GaryMazzone
that is really strange isn't it?Quote:
Originally Posted by GaryMazzone
What so strange about someone's changing registry values (if they know how to do that of course)? No one is going to reverse engineer your program.Quote:
Originally Posted by M C Benzerari
You cannot stop hacker - all you can do is make it harder for someone and following steps we recommended (including encryptions) is what you should really be doing.
Good luck.
Any way the code for the number of launches worked ok. What about if I want the application to be accessable for one month starting either from the first day it has been launched or for more specific number of days say from '1 of sep 2007 till '1 oct 2007' I would like to see the VB code in both cases please.
Thank you
M C Benzerari
Why don't you try to do it yourself and then if you have problems show us your code.Quote:
Originally Posted by M C Benzerari
I would have gone the route of creating an encrypted .dat file and inserted an identifier and a checksum. This way you can edit the values on each run and/or control the termination date.
That is what this forum is for thought! get what others have and compare it to what I have, and like that I can discover what is going wrong in my analogy...!Quote:
Originally Posted by MartinLiss
Every day is school day isn't?
Fortunately, above any expertise there is an expert to refer to...:wave: