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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -