Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Execute command within form and shell

Posted on 2008-06-18
4
Medium Priority
?
2,194 Views
Last Modified: 2013-11-26
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
Comment
Question by:jhieb
[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
  • 2
4 Comments
 
LVL 16

Expert Comment

by:ororiole
ID: 21818444
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
 
LVL 1

Author Comment

by:jhieb
ID: 21862378
I would like to open a dos window in the form, but I am also interested in your link. Please post it.
0
 
LVL 35

Accepted Solution

by:
torimar earned 2000 total points
ID: 21862531
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
 
LVL 1

Author Closing Comment

by:jhieb
ID: 31468632
Thanks for the advice and the link
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

705 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