in reply to exec vs. system

Based on the above responses (and the fact that you are using Windows), maybe using threads might be a better solution for you?

See BrowserUK's posts for some good examples. Try this one which uses threads to run system commands or this one which uses Thread::Queue (but no system command).