LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Count how many times a program has run

Solved!
Go to solution

Hi all,

 

For safety measures,the program I am working on should close itself f.e. after 31 jan. 2023 and after that the client can only click 5 times on the start button before the program closes forever. The time I can program and of course I can do the counting by saving the number of tries to start in a txt file or so, but that way I leave a possible way to circumvent the safety because the client can just reset the counter in the txt file I am reading in the program.

is it possible to do the counting internally?

 

Regards,

 

0 Kudos
Message 1 of 5
(1,102 Views)
Solution
Accepted by topic author Ham31

@Ham31 wrote:

is it possible to do the counting internally?


No. And even if you could, the user can reset it.

 

You can make this hard, but there's no way to prevent the user from using the same mechanism as your program is using.

 

You could for instance encrypt the number in a file. The encryption key would be in the program, so it's out there with the user. If (s)he's clever, a copy of the original file would simply reset the counter.

 

To prevent this, you can make a 2nd file with e.g. a timestamp or random string. But again, nothing is preventing the user to copy and replace both files.

 

A simple way for the user to bypass all of this is to simply install in a VM, and not save it or keep a copy.


The only way to make this somewhat safe is to make a centralized database, maintained by you. Still, the entire database can be faked, or the check can simply be removed.

 

It's really about how hard you want to make it. For yourself and the user.

0 Kudos
Message 2 of 5
(1,088 Views)

okay I don't want it to be very hard for myself.

 

I just realized you probably get the same problem with the time. The time that LabVIEW uses is I think the system clock of the computer, right? Then the user can just set the system clock of the computer to another date.

 

To make it a bit more difficult, can I use registry keys or is that not a viable option?

 

 

 

0 Kudos
Message 3 of 5
(1,075 Views)

Of course you can.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 5
(1,072 Views)

@Ham31 wrote:

To make it a bit more difficult, can I use registry keys or is that not a viable option?


The registry would be the first place people look 😂.

 

You'd have to define how much effort this would take to crash, for let's say a noob, an average person and a hard core hacker. If your audience are all noobs, you can take it easy.

 

I've seen more time being wasted on protection that the product will ever make... Even if 50% of the users use your software illegally, it might cost you less then making a protection. Keep in mind that making a protection doesn't mean those hackers become your paying customers.

0 Kudos
Message 5 of 5
(1,020 Views)