How do I record the number of times a user has used my program?

  • Thread starter Thread starter C
  • Start date Start date
C

C

Earlier I used to record one line in a file sitting in an obscure
location to count the number of uses and when. With Vista and 7, it is
messy to try to write in some locations because of UAC. What would be
a good way to solve this problem in VB.net?

How do you prevent the user from using the program if he has been told
to use it only for 30 days? Users can easily change the date on the
computer, so one line of If Now > something then End does not work.

Thanks.
 
Earlier I used to record one line in a file sitting in an obscure
location to count the number of uses and when. With Vista and 7, it is
messy to try to write in some locations because of UAC. What would be
a good way to solve this problem in VB.net?

How do you prevent the user from using the program if he has been told
to use it only for 30 days? Users can easily change the date on the
computer, so one line of If Now > something then End does not work.

Thanks.

Though most of people can consider storing first launch date of
program in registry or in a file cryptically, i believe it's not the
best protection though it can only be choosen for non-in-depth-
knowledge-having people. However, if the program is a internet-based
one, i believe its best to let the user activate the program online,
by means of a web service or a http server remotely. On each launch,
it can ask server to grant launch permission. So, server will
calculate "Now minus activation time". The disadvantage of that method
is that program client can get bored while waiting response from
server, or the client of program may not have access the Internet.

Another option could be, such, mixing some hidden but certain values
mixed together in a single file or key. That would be user's attempt
harder to extend trial.

Onur Güzel
 
I've often used a method of writing an encoded
Registry value and also writing a file to disk in
someplace like the Windows folder. Then I can
check the file date and the Registry setting. If those
are set during install you should be able to read
them OK with normal user rights.

Nothing will stop determined people, but it doesn't
take much to stop most people. Very few people will
change the date on their PC. That would mess up all
their files.

| Earlier I used to record one line in a file sitting in an obscure
| location to count the number of uses and when. With Vista and 7, it is
| messy to try to write in some locations because of UAC. What would be
| a good way to solve this problem in VB.net?
|
| How do you prevent the user from using the program if he has been told
| to use it only for 30 days? Users can easily change the date on the
| computer, so one line of If Now > something then End does not work.
|
| Thanks.
 
Onur,

For what you write there has in my idea to be a privacy protection
declaration like Microsoft does and an acceptance of that.

Many person will believe Microsoft, Adobe, Google, Kaspersky.

But will they direct trust an obscure person let say like Cor.

I doubt it.

It does not mean the program will not be used, but if it is about a kind of
try out for a program, I assume it is throwing the baby out with the bath
water.

Cor

"Onur Güzel" wrote in message

Earlier I used to record one line in a file sitting in an obscure
location to count the number of uses and when. With Vista and 7, it is
messy to try to write in some locations because of UAC. What would be
a good way to solve this problem in VB.net?

How do you prevent the user from using the program if he has been told
to use it only for 30 days? Users can easily change the date on the
computer, so one line of If Now > something then End does not work.

Thanks.

Though most of people can consider storing first launch date of
program in registry or in a file cryptically, i believe it's not the
best protection though it can only be choosen for non-in-depth-
knowledge-having people. However, if the program is a internet-based
one, i believe its best to let the user activate the program online,
by means of a web service or a http server remotely. On each launch,
it can ask server to grant launch permission. So, server will
calculate "Now minus activation time". The disadvantage of that method
is that program client can get bored while waiting response from
server, or the client of program may not have access the Internet.

Another option could be, such, mixing some hidden but certain values
mixed together in a single file or key. That would be user's attempt
harder to extend trial.

Onur Güzel
 
Though most of people can consider storing first launch date of
program in registry or in a file cryptically, i believe it's not the
best protection though it can only be choosen for non-in-depth-
knowledge-having people. However, if the program is a internet-based
one, i believe its best to let the user activate the program online,
by means of a web service or a http server remotely. On each launch,
it can ask server to grant launch permission. So, server will
calculate "Now minus activation time". The disadvantage of that method
is that program client can get bored while waiting response from
server, or the client of program may not have access the Internet.

The solution does not have to be fool proof, and the program will not
run on Internet. I can send a few users this program by e-mail to try
out and comment to me. If possible, I would like to know how many
times they have run the program.

I know nothing about registry. How could I store this information in
the registry? By creating a new key with values?
Another option could be, such, mixing some hidden but certain values
mixed together in a single file or key. That would be user's attempt
harder to extend trial.

Onur Güzel

Thanks.
 
  I've often used a method of writing an encoded
Registry value and also writing a file to disk in
someplace like the Windows folder. Then I can
check the file date and the Registry setting. If those
are set during install you should be able to read
them OK with normal user rights.

First of all, I cannot create and write a new file under C:\Windows
with UAC turned on. Even if this is done with permission the first
time, there is a risk that someone will change the date on the
computer temporarily to run the program. So it would be good to know
the number of times it has been tried, and if someone has turned the
date back, for which it would be good to record the time of each use.
   Nothing will stop determined people, but it doesn't
take much to stop most people. Very few people will
change the date on their PC. That would mess up all
their files.

I have heard too many people doing that. I used to cheat my own
program the same way earlier. Now I have given myself a blanket
license forever.
 
Using the registry (the user one) is easy in VB.Net

AFAIK have there not been changes since 2002

http://msdn.microsoft.com/en-us/library/aa289494(VS.71).aspx

Success
Cor

"C" wrote in message

Though most of people can consider storing first launch date of
program in registry or in a file cryptically, i believe it's not the
best protection though it can only be choosen for non-in-depth-
knowledge-having people. However, if the program is a internet-based
one, i believe its best to let the user activate the program online,
by means of a web service or a http server remotely. On each launch,
it can ask server to grant launch permission. So, server will
calculate "Now minus activation time". The disadvantage of that method
is that program client can get bored while waiting response from
server, or the client of program may not have access the Internet.

The solution does not have to be fool proof, and the program will not
run on Internet. I can send a few users this program by e-mail to try
out and comment to me. If possible, I would like to know how many
times they have run the program.

I know nothing about registry. How could I store this information in
the registry? By creating a new key with values?
Another option could be, such, mixing some hidden but certain values
mixed together in a single file or key. That would be user's attempt
harder to extend trial.

Onur Güzel

Thanks.
 
Onur,

For what you write there has in my idea to be a privacy protection
declaration like Microsoft does and an acceptance of that.

Do you mean that writing to the registry will need the user to trust
the person who has sent the program?

That will not really be a problem because I will send it only to a few
people I know.
 
No this is related for using a webservice for this purpose

"C" wrote in message

Onur,

For what you write there has in my idea to be a privacy protection
declaration like Microsoft does and an acceptance of that.

Do you mean that writing to the registry will need the user to trust
the person who has sent the program?

That will not really be a problem because I will send it only to a few
people I know.
 
* C said:
How do you prevent the user from using the program if he has been told
to use it only for 30 days? Users can easily change the date on the
computer, so one line of If Now > something then End does not work.

One general thought: Any attempt to enforce something using code that
runs on the client's machine can be defeated (and it's most of the time
not particularly hard to do so). So -- either ship a version with
reduced feature set for testing or just trust people not to "hack" your
shareware counter.

That said, I'd go for the registry solution. Write an encrypted
timestamp somewhere in the user registry (and maybe not in
HKCU/Software/[Company]/[Product], that would be TO obvious :)

Regards,
Felix
 
Back
Top