added function isWindows and changed proc_open to exec