window() does not actvate a window. I don't know whether exec waits for a .bat, though. Test it.