Trial version

  • Thread starter Thread starter Rodrigo Ferreira
  • Start date Start date
R

Rodrigo Ferreira

How can i create a trial version for my component?

I develop a User control and now i want to create a trial version!

Greeting!
Rodrigo Ferreira
 
It depends on wheather you are limit the number of uses of your control
(e.g. 100 times) or the timespan (e.g. 30 days) it can be used or you limit
the functionality (some buttons do not work, create e messagebox if user
clicks on it).
If trial period has expired show a messagebox or throw an exception or
something.
You store the values (days left and so on) in the registry.
If the user enters the registration key you set a variable in the registry.
You can additionally store a checksum in the registry to prevent that the
user changes your values.
 
I don't understand very well!

Supose:

I want to limit the use of my control in 15 times. How can i store this kind
of information?
Code will be helful!
 
It all depends on how you want your trial version to work.

Do you want it to work for a limited amount of time during execution before
saying something like: “Your 15 minutes of use has expired and this
application will now close. In the registered version of this component, this
message is disabled.â€

Have it work for... 15 days before refusing to start?

What about cutting off certain features in the trial version?

Brendan
 
Like 15 days!

Brendan Grant said:
It all depends on how you want your trial version to work.

Do you want it to work for a limited amount of time during execution
before
saying something like: "Your 15 minutes of use has expired and this
application will now close. In the registered version of this component,
this
message is disabled."

Have it work for... 15 days before refusing to start?

What about cutting off certain features in the trial version?

Brendan
 
The easiest way for you to do so would be to have your component check a
value in the registry that would note it’s first use/install date and then
compare that date + your time limit to the current date and act accordingly.

In order to populate that registry entry to begin with, on each load of your
component it would need to check for the presence of it, and if it does not
yet exist, create it with the current date.

This method does suffer from an obvious flaw that if a user of your
component chooses, they can easily tweak the registry value themselves every
few days to keep them within the calculated window. If you wanted to take
some steps to prevent that, you could also store a hash of the date, or
encrypt the date and store that in the registry so that it is not obvious
what the value is.

Unfortunately, none of this will prevent someone who is determined to keep
the trial working indefinitely, but it will make it a bit harder.

Brendan
 
Ok! but how i save this information in the registry? Like if my component
had 15 days trial?
 
1. When your control loads have it check the registry for these values
"RegisteredUsername", "RegisteredKey", "TrialStartDate". If TrialStart Date
Doesn't exist create it with todays date.
2. If the RegisteredUsername length < 5 or RegisteredKey is not the
encrypted version of the RegisteredUsername then have it check the trial
date, today > TrialStartDate-15.
3. If the trial test fails have it pop a register form with a link to your
website where they can create a key. On this same form have a box to enter
the RegisteredUsername and RegisteredKey.
4. When they click Ok on the register form have it check the
RegisteredUsername and RegisteredKey to see if they pass the test and if
they do write them to the registry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Click Event 2
Shift+Insert 1
DropDownList 2
User Control 2
String Size 2
DataGrid 1
Protect application 1
Affinity Photo vs Adobe Photoshop 11

Back
Top