hi,
I want to open command prompt automatically (in hidden mode) using c# or vb code. And commands should be used in command prompt, which are also written in code.
thanks in advance...
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Karthikeyan AnbarasanRank #71 · 25.5K reputationPosted Apr 7, 2011, 12:41 AM EDT
Deepak VermaRank #672 · 3.6K reputationPosted Apr 7, 2011, 3:46 AM EDT
Karthikeyan AnbarasanRank #71 · 25.5K reputationPosted Apr 7, 2011, 7:06 AM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Apr 7, 2011, 4:39 PM EDT
Do you need to execute a console program? Or some console programs? Console programs execute in a command prompt window. I will assume that the applications to be executed are console programs.
I assume that you need to send commands to the console programs and get the output back. That is called redirection. It is not possible to do that for all console programs but hopefully you can do it for the applications you need to do it for. You can test the applications to ensure that redirection works with them. Do you understand? You can use "<" on the command line to specify a file for input commands and ">" to specify a file for output to go. If you can verify that redirection works for the applications then we should be able to help you with the rest.