>I have a client that is networked using Win 95. I would like to be able to identify if a user has a specific application open that must be closed at midnight to avoid problems.
If it's a console application (something that has a user interface), and you know the exact text of the caption for the main window, you can check to see if the window exists with the API call FindWindow().
>
>The next step if the above is possible would be to terminate the application if possible.
Assuming that the first is true and it's a Windows application, you can use SendMessage() to try to shut it down. If somehow you could get the Process Handle, you could use TerminateProcess() to shut it down, but you'd need to record the ProcessID at startup and hang onto it until it was needed. The easiest way to do that would be to write a small application that launched the app you want to be able to shut down. It would then wait until the shutdown time, and if the process it launched was still running, kill it via SendMessage() or TermianteProcess() as appropriate, and then shut itself down.