Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# C#4.0
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 14-Dec-12 13:55pm
Edited 15-Dec-12 23:11pm
v2
Comments
Sergey Alexandrovich Kryukov at 14-Dec-12 23:00pm
   
What do you mean by DOS?
--SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
v3
Comments
Shahin Khorshidnia at 16-Dec-12 7:16am
   
+5
Sergey Alexandrovich Kryukov at 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)

  Print Answers RSS
0 OriginalGriff 520
1 Maciej Los 290
2 Richard MacCutchan 265
3 BillWoodruff 265
4 Suraj Sahoo | Coding Passion 155
0 OriginalGriff 8,764
1 Sergey Alexandrovich Kryukov 7,437
2 DamithSL 5,639
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web01 | 2.8.1411028.1 | Last Updated 16 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100