public function run(Result $result = null)
    {
        $cmd = $this->getBuiltCommand();

        $result = ($result) ? $result : new Result();
        if (($this->os->isWindowsLike() && !($this->flags & FORCE_USE_PROC_OPEN)) || ($this->flags & FORCE_USE_EXEC)) {
            return $this->exec($cmd, $result);
        } else {
            return $this->procOpen($cmd, $result);
        }
    }