Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

make a trial version

Status
Not open for further replies.

bantakiah

Programmer
Oct 1, 2006
48
ID
please help me how to make a trial version program
i want make 2 kind of program

1. trial version with date but if the user change a date it will not effect if the trial is already make in time.

2. trial version with counter how day my program run in trial


thanks
 
Private Sub Form_Activate()

Dim SpecialDate As Date

SpecialDate = DateSerial(2007, 6, 25)

If Now() > SpecialDate Then
MsgBox "The trial period has expired"
Unload Me
End If

End Sub
 
>SpecialDate = DateSerial(2007, 6, 25)

While Hugh's logic is fine, I would be careful doing something like this in production. If you want to change the date, you don't want to go hunting for it in your code. At the very least, make this date a global constant and find some way to tie it to a version number.

HTH

Bob
 
if i use Hugh code so if other people change date system so the program still running except date > special date ?

i want if somebody change date after expired even the date is < special date it stiil expired
 
Anyone who would change the system date to run a program probably isn't one you would be selling the program to (assuming that's what you are doing). You know how much trouble it is to change it and change it back just to run one program so they don't have to pay you? It's not the doing it so much as the timestamps for everything else you do. And it's most likely the clock is sync'd to the internet time somewhere anyway so that will reset the date.

If this is your concern, then do it by number of runs and put an entry in the registry that sufficiently cryptic so no one will figure it out.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
<Anyone who would change the system date to run a program probably isn't one you would be selling the program to

Yes, but...you can also set the date as a registry entry, and make it hard to find. That would overcome this hack.
 
how to entry the registry. please give me as ample step by step. please
 
>and make it hard to find

Plenty of tools that watch what registry keys are read and written by a program ...
 
What about using a file with the start date encrypted in it. If the file is removed or the value changed (use a checksum) then the program no longer runs.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
> Do you have a means that you prefer?

I don't bother, to be honest. Not since about 1986.
 
how to connect and read the file with vb object ? so the file can read in vb object?
please give the sample code
 
See the open and line input commands in help.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
<I don't bother, to be honest. Not since about 1986>

Same here.
Software even pirated/ extended trial software (you should be flattered) is good publicity as long as its working. If it ain't working :(
You should aim to have the software work but just need occasional support/ upgrade from you.

If you must I suggest you need nothing more than the code I have already supplied on the apps Startup Form.
 
Not since about 1986

After reading this, I was thinking you might actually be older than I am, strongm, but knowing you, you probably entered your professional career at the age of 11. So perhaps not. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top