>>> Unfortunately, CLOSE ALL is spread throughout the code of
>>> all the programs so using a low level file open/create to
>>> make a file that only exists during execution of the program
>>> won't work. This is the method I've used in the past.
>>
>>How about creating a permanent DBF? Every time a user logged
>>in, a record is inserted into it; logout, removed from it.
>>A look into the table will know who is/are using a program,
>>what program, when... Then you can control access.
>
>This approach only works if the app NEVER dies or is terminated abnormally. The client's server is EXTREMELY unstable. Users are kicked out several times a week which would leave the records saying that users are still logged. Therefore this would not work in this situation.
If you use a local file, the server isn't involved at all. The problem appears to be a single station running >1 instance, not >1 instance running under a given userid on the network, so a local file would appear to clear that up neatly. No muss, no fuss, no lock release delay issues, etc.