As you seem to be on Windows, did you try? msdn.microsoft.com/.../system.environment.exitcode(v=vs.110).aspx Continue reading...