473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

dos commands from windows forms

Hey,
I want to have a small command prompt type shell in one of my forms
that will allow a user to issue dos(if i can still call it dos)
commands from within my windows for and show the output from that
command in a textbox or label.

For the life of me I can see any way to do it.
The closest thing I have found to what i need is
system.diagnostics.process.start() but its limmitted to fireing off an
exicuteable, url or other resource in its natural exicution env. (eg.
ipconfig.exe will launch a new command prompt) and the output is shown
in the new command prompt window or web browser etc.

I have concidered useing a local service and isueing commands through
that but again how do i get the service to issue commands and retrive
the output?

I did manage to get it to work with ssh but most users aren't going to
want to run ssh or telnet just for this feature.

I have exhausted msdn and .net 247 ( a great reference resource
http://www.dotnet247.com/247reference/namespaces.aspx ) but can't find
any classes that offer this functionality and it is way over my head
to build it myself from the ground up.

Any help would be greatly apriciated.
Nov 20 '05 #1
2 1708
* ju*****@yahoo.com (Harley) scripsit:
I want to have a small command prompt type shell in one of my forms
that will allow a user to issue dos(if i can still call it dos)
commands from within my windows for and show the output from that
command in a textbox or label.


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

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Thanks,
This is exactly what I needed and integrated very easily into my owne
application. very clean and well written also. :)


hi***************@gmx.at (Herfried K. Wagner [MVP]) wrote in message news:<#9**************@TK2MSFTNGP12.phx.gbl>...
* ju*****@yahoo.com (Harley) scripsit:
I want to have a small command prompt type shell in one of my forms
that will allow a user to issue dos(if i can still call it dos)
commands from within my windows for and show the output from that
command in a textbox or label.


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

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Moosebumps | last post by:
So, after reading some messages about os.system, and looking at the popen stuff and trying it a bit, I still have not found a way to keep a command window open for several commands (on Windows...
4
by: ÂÑTØÑ | last post by:
Hi, I was looking for a list of commands, but I can't find it. It's about commands you can type in the Internet Explorer adress bar, to get some information about a website. For instance...
1
by: Raquel | last post by:
Ok...So there is a "CREATE DATABASE" command to create a Database (as a "CLP" command), while there is a "db2icrt" command (as a "System" Command) to create an instance...why such variation? Why is...
1
by: xtra | last post by:
Hi Folk I have written a module that allows you to type a bunch of commands in the immediate window, for quick access to information when you are creating VB code. Here it is, it may be helpful...
2
by: Martin Maat | last post by:
I am almost longing for MFC (no, not really, but a couple of things seem to be less powerfull in Windows.Forms). One is updating menu item status. Having commands separated from the UI thingies...
0
by: Harley | last post by:
Hey, I want to have a small command prompt type shell in one of my forms that will allow a user to issue dos(if i can still call it dos) commands from within my windows for and show the output...
10
by: cj | last post by:
I'm having a problem writing an insert command to work with a datatable. I've looked at what the sqldataadapter creates and created my insert command to look the same. I have:...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
1
by: erbilkonuk | last post by:
Hi everyone, I have been developing a project that is composed of one windows service and one ASP.NET web site. The windows service and ASP.NET web site reside on the same server. I want to send...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.