c# - CMD closes after a second -
so after pressing "launch" button, cmd opens , closes right after second or so. can see, i'm trying open .exe file through cmd parameter line. works when manually, when put c#...
system.diagnostics.processstartinfo proc = new system.diagnostics.processstartinfo(); string host = textbox1.text; string fp = textbox2.text; string port = textbox4.text; string time = textbox5.text; string threads = textbox3.text; string type = "get"; string param = string.format( " /c {0} start c:/dos.exe " + host + port + fp + time + threads + type, environment.newline); system.diagnostics.process.start("cmd.exe", param).waitforexit();
use console.read() @ end cmd waits key pressed before closes
Comments
Post a Comment