How to check if a program is already running?
Hi,
I've checked everywhere and am surprised not to be able to find the answer to what must be a common problem.
I am installing a program, and want to check if the program is already running. If it is, obviously I won't be able to update it with a new version, so I want to pop open a window telling them to exit it first.
I could set overwrite mode to "try" and use "IfErrors" afterwards, but the copy might have failed for some other reason (need admin permissions, for example).
I looked at FindWindow, but the title changes, and the class seems to change too.
If only "File" did more than just set an error flag. I need to know what the error was. If it was a file-in-use error, then the program is probably already running. If it is a permission thing, then they probably need to log on as Administrator.
Any ideas out there?
Thanks,
Rob.