Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
There are a program in my field called Clustalw2 which take a file contain DNA sequences and recieve a sort of commands (in console window) to manipulate these data to export an text file which I want to import in another program I have written the problem is :

1- open this program inside my program and sending it data location and commands series
2-threading my program to wait the clustalw to finish data processing to import results files

I have tried the next code to run program in Dos but it didn't work:
System.Diagnostics.ProcessStartInfo sdpsinfo =new System.Diagnostics.ProcessStartInfo ("cmd.exe", @"C:\Program Files (x86)\ClustalW2\clustalw2.exe");
         sdpsinfo.RedirectStandardOutput = true;
         sdpsinfo.UseShellExecute = false;
         sdpsinfo.CreateNoWindow = true;
         System.Diagnostics.Process p = new System.Diagnostics.Process();
         p.StartInfo = sdpsinfo;
         p.Start();
         string res = p.StandardOutput.ReadToEnd();
         Console.WriteLine(res);
         Console.Read();
Posted
Updated 15-Dec-12 22:11pm
v2
Comments
Sergey Alexandrovich Kryukov 14-Dec-12 23:00pm    
What do you mean by DOS?
--SA

1 solution

Your code fragment and tag suggest you use .NET, and, to best of my knowledge, none of the systems which can host .NET support such thing as "DOS", which is an old historical wanna-be-OS. So, the question makes no sense at all.

As to .NET or native windows console applications, they are regular Windows (protected-mode, targeted to x86, x86-64 or Itanium, fully incapable of running in that 16-bit real-mode used by DOS, etc.) applications having nothing to do with DOS, and not really different from any other Windows application, with one little difference: they show a standard console.

Having a console cannot compromise any functionality at all. You are probably missing something very basic; and you do not provide any information helping to understand what.

—SA
 
Share this answer
 
v3
Comments
Shahin Khorshidnia 16-Dec-12 7:16am    
+5
Sergey Alexandrovich Kryukov 16-Dec-12 13:48pm    
Thank you, Shahin.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900