pidev
pidev

Reputation: 131

Some idea of "Application limiter"

Using Java I want to create an application which counts how many times some application (either some game or other .exe file) has been run. Basically what I want is to limit how many times some game can be run.

I don't need code I just want someone to direct me which steps I have to make in order to do this.

I have some thoughts so here they are. First of all this application needs to be run on startup. The part I don't know is how to make a logger which contains how many times application has been run based on how many times someone double-clicked on it. So with that information I could set a limit or something similar. Tell me if this doesn't make any sense but I would really like if someone could help me with this one. Thanks Ivan.

Upvotes: 1

Views: 77

Answers (2)

rds
rds

Reputation: 26984

Based on your comment

  • don't run the program directly. Use a launcher written in your preferred programming language
  • The launcher keeps a small database of executions and applies a policy based on this information

Upvotes: 0

jbh
jbh

Reputation: 1153

The easiest way to do this would be to poll the running processes. However this could be circumvented by renaming the process or changing whatever identifier you are using. As far as I'm aware you cannot get "process start" events in Java.

Do you have access to this game? (As in can this be implemented inside the game?) Or is this a usage count of an arbitrary executable?

Upvotes: 1

Related Questions