I do have one windows-based C# application that calls one external scan.exe file to scan one directory.
Below the codes I do the process call:
Process p = new Process();
p.StartInfo.FileName = @"Scan.exe";
foreach (FileInfo file in fileList)
{
p.StartInfo.Arguments = @" /ALL /ARCHIVE " + file.FullName;
p.Start();
//System.Threading.Thread.Sleep(200);
}
When I run it, the Scan.exe file pops up (with UAC windows) with every file name passed in. Supposedly, in the list, there are six files, the scan.exe pops up 6 times.
Is there a way I can open create one process and reuse it in the for loop?
Thanks