Added windows part of the function to start another process, fixed the command line switch function.