Quote Originally Posted by Tischnoetentoet
Do you have control over the other application or not?

What you can do is enumerate all process and check if a specific process is running if you don't have control about the other application.

If you have control over the (source of) the other application, it's wise to create a semaphore.
I won't have control over when the other application can be started. The app I'm worried about is a vb6 app that provides the end-user the ability to reboot the machine.

The program I'm developing will be a c# console app that controls critical file synchronization for our enterprise application. It will be invoked behind the scenes and invisible to the user. I need to ensure that the user can't run the vb6 reboot app while my yet-to-be-developed file sync app is running.

I've also been looking into the mutex object. Would that be a better alternative? I'm using framework 2.0.

Thanks again!