Replace exec with spawn on Windows, need to test this