c# - Error code of netsh -
i capture output , exit code of process this:
process proc = new process { startinfo = { redirectstandardoutput = true, useshellexecute = false, filename = environment.systemdirectory + "\\netsh.exe", arguments = "http delete urlacl url=http://+:8080/my/url/suffix" } }; proc.start(); proc.waitforexit(); int exitcode = proc.exitcode; string output = proc.standardoutput.readtoend();
when inspect exit code,
1
when inspect output of process,
url reservation delete failed, error: 2the scheme cannot find file specified.
the output expect be. trying delete reservation not exist. need error code buried within of output. need write own custom parser takes business relationship of weird messages netsh might throw @ me?
is there simple way error code?
c# cmd
No comments:
Post a Comment