Click here to Skip to main content
12,948,567 members (62,783 online)
Rate this:
Please Sign up or sign in to vote.
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;
         string res = p.StandardOutput.ReadToEnd();
Posted 14-Dec-12 12:55pm
Updated 15-Dec-12 22:11pm
Sergey Alexandrovich Kryukov 14-Dec-12 23:00pm
What do you mean by DOS?

1 solution

Rate this: bad
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.

Shahin Khorshidnia 16-Dec-12 7:16am
Sergey Alexandrovich Kryukov 16-Dec-12 13:48pm
Thank you, Shahin.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,419
CHill60 3,275
Maciej Los 2,778
Jochen Arndt 1,935
ppolymorphe 1,795

Advertise | Privacy | Mobile
Web02 | 2.8.170524.1 | Last Updated 16 Dec 2012
Copyright © CodeProject, 1999-2017
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