It seems to me the problem with using flags (whether they be files or environment variables) is that if something crashes, the flag won't be reset.
Perhaps a better way might be to use a simple Win API call to FindWindow with your window title or something.
Thoughts?
Perhaps a better way might be to use a simple Win API call to FindWindow with your window title or something.
Thoughts?