SharkyUA, я бы сделал так (Код на С#) :
Код:
If (CheckBox_All_Ports.Checked)
{
ToolStripStatusLabel_PortScanner_Status.Text = "Scanning...."
StringBuilder sb = new StringBuilder();
if (CheckBox_Write_log.Checked)
{
sb.Append(MaskedTextBox_IP.Text + "1 65535 TCP /noflood" + "/L:.\logs\port_scan.log");
}
else
{
sb.Append(MaskedTextBox_IP.Text + "1 65535 TCP /noflood");
}
Wait = Process.Start(".\tools\CBPS.exe", sb.ToString());
Wait.WaitForExit();
ToolStripStatusLabel_PortScanner_Status.Text = "OK! Ports Scanned. Busy...";
}