I'm testing an application in a stress test.
That's why I need it to restart if an error occurs (an error window opens) or it hangs or crashes. At the same time I need to collect all the useful information about the problem which lead to a restart: make a dump file and copy the error text from the error window (and/or take its screenshot).
With bash it's easy: Restarting program automatically on crash in OSX (without screenshots or dumps, but the error window stays on MacOS, so they are practically not needed there). However, I need this functionality to run on Win (XP/Vista/7).
I can use special monitoring tools for restart, but that way I would rely on non-standard programs. I can use User Mode Process Dumper on XP, but it doesn't work for Vista.
Is there any elegant and universal way (batch file or perl script would be great) to implement described functionality for all versions of Windows?