?
Solved

How do I reflect output from dos command?

Posted on 2004-09-10
7
Medium Priority
?
207 Views
Last Modified: 2012-05-05
Hi, I am new to VB & .net.

I need to create a simple application that will allow me to have a button pushed that reflects dos command and then the output reflected in a return box.  I also need to be able to add variables to the button(s) instructions.

if you need more info, please let me know.
0
Comment
Question by:ganongj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 3

Expert Comment

by:imu79
ID: 12028075
Could you clarify a bit please..

Imran.
0
 
LVL 4

Author Comment

by:ganongj
ID: 12028428
Here's an example:

a gui interface to traceroute.
a button on the vb interface that runs traceroute, some text box for variables to use when button pushed (the i.p. address to be tracerouted)
a box that reflects the results and stays there until closed.
0
 
LVL 3

Expert Comment

by:imu79
ID: 12029024
So basically you want to redirect the ouput from the console (command) window to some textbox.

here's an example that should work:

http://dotnet.mvps.org/dotnet/samples/miscsamples/downloads/RedirectConsole.zip

Note that in the sample. a new thread is created to read the output since the output is being dynamically generated. If you just tried to read the output, you could run into problems.

hope that helps..
Imran.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 4

Author Comment

by:ganongj
ID: 12030230
Ha ha, very funny, the example is in German!
0
 
LVL 3

Accepted Solution

by:
imu79 earned 1000 total points
ID: 12030391
well..that wasn't meant to be a joke. yes, the comments are in a different language (i'm not sure which one..) but the code is still in english, right? I mean you should be able to get an idea from that.

anyway, Here's another version of the same thing (slightly different):

http://tinyurl.com/4jwys

Everything is the same as the previous sample except the reading of the output. You should start the reading of the output in another thread since the output is being generated dynamically and it would freeze your application till the read is complete. Just use the code to start the process from the link above and use the threading technique that's in the sample that I sent you earlier. It should be easy to read. Let me know if you have any problems.

hope that helps..
Imran.
0
 
LVL 4

Author Comment

by:ganongj
ID: 12102434
This really hasn't answered my question so I am leaving it open.

Jim
0
 
LVL 4

Author Comment

by:ganongj
ID: 12189504
I give up.  No answer given. apparently no  one knows.

Jim
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month12 days, 11 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question