Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2196
  • Last Modified:

Execute command within form and shell

Hello,

This might be hard to explain since I am new with VB.NET, but here is a try. I want to create an app that will excute DOS commands. Rather than have the dos commands excute outside of the app, I would like to create a form that has a DOS window placed into it. Then, when I collect the information I want via the form fields, I will use that information to run the dos command. Is this easy to do, and if so, can you give me a small and easy example or direct me towards information to teach me how to do this?

Thanks,
John

0
jhieb
Asked:
jhieb
  • 2
1 Solution
 
ororioleCommented:
If you dont actually need to open a dos window inside the form, this link will give you examples on how to execute dos commands inside your windows app. Its actually in C# but most of it is just using the System.Diagnostics.Process class so you will be able to follow it ok.
0
 
jhiebAuthor Commented:
I would like to open a dos window in the form, but I am also interested in your link. Please post it.
0
 
torimarCommented:
It is one thing to execute DOS commands from within your programme or to create something that looks like a DOS window (scrolling textbox with black background and white text in monospace letters), it is a completely different thing to actually operate a DOS box within your programme, which means you have to capture the output of a DOS command and display it in the imitated DOS textbox inside your application, plus you will have to pass commands typed into this textbox over to DOS.
For all this, you will have to create what programmers call a "pipe"; a "read-pipe" to capture, a "write-pipe" to pass through your commands.

Although I never tried to do this in VB (did it in Delphi once many years ago), I should say that it is definitely not easy stuff for beginners.

In case this doesn't put you off, here's the point where you can start:
http://www.devx.com/dotnet/Article/7914/1954
(check section: Controlling Process I/O)
0
 
jhiebAuthor Commented:
Thanks for the advice and the link
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now