>Is there a way to test if another instance of VFP is running. My aim is to prevent it from happening with users.Your users don't have VFP? Do they?
If that's the case, as I suppose, then your question is more like how to avoid running a second instance of your program (your EXE).
A flag in the disk is a cheap solution. Not that good or sophisticated but cheap.
A better one, used by commercial frameworks, is to use a user manager. This way, whenever they login into your app you can control if they are already there, by checking into a user table. Any other instance would use the same table (assuming your app is installed once per directory per machine).
A way to avoid users installing two copies of your app is to suplly an install routine that uses the registry. Else, with a simple copy/paste installation they could install more than one copy.