--- In [email protected], "iqbal_delphidev" <[EMAIL PROTECTED]> wrote: > > You may count the number of time your exe have been run. > Actually your exe make new instance evry time it runs, so you can > not > make any global variable to count the users who have executed your > exe. > > But using a trick you can count the number of users who have > executed... > To do this just declare a global variable suppose > > GlobalCount: Variant; > > then use a function lets say > > function AddUserCount: Variant; > > and in the boday of function u can use the trick > > begin > if GlobalCount = Nil then GlobalCount := 0; > Result := GlobalCount + 1; > end; > > so using the above trick u may count the number of instances. > but its might not be the real time instance, I think now you will be > able to do your need... >
Please explain this, because to me this can never work. You are using a Local variable in the program and that can only work for one usage of the EXE file. When you start the first instance, you get the value 0 for GlobalCount. When you start the second instance, you ALSO get the value 0 for GlobalCount. Because, both programs do NOT interact with each other.

