473,804 Members | 3,674 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.diagnost ics.process.sta rt() 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 1745
* ju*****@yahoo.c om (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******* *******@TK2MSFT NGP12.phx.gbl>. ..
* ju*****@yahoo.c om (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
3507
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 2000/XP), while seeing the normal output in a command window. All I want to do is do what a batch file does, but I want to actually have functions and associative arrays and all the other niceties of python. What's the deal with that? I thought...
4
9601
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 "javascript:alert(document.lastmodified)" to find out when the website was updated. Can someone help me out? Thanx in advance,
1
2294
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 there not a "CREATE INSTANCE" command? TIA Raquel.
1
2687
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 to you (I find it pretty fast and friendly).... Some of it is specific to my database (I left out many as well which were too specific), so you will have to rewrite it for yours, but you may find it useful.... Any questions, please ask. Typing...
2
1946
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 that invokes them and event handlers for updating the command's status was very convenient. I don't see this in Windows.Forms and this seems like a step back. Another related issue is help text in the status bar when the user wanders through...
0
273
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 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...
10
3276
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: MySqlAdapter.InsertCommand = New SqlCommand("INSERT INTO billing( type, dsc ) VALUES ( @type, @dsc)", MySqlConnection) But it gives me the following error when MySqlAdapter.Update(MyDt) executes: Must declare the variable '@type' Could someone tell me what I'm...
1
7852
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 am note sure what to do because all propertiers work, except the System.Data.DataColumn.. I didn't write any code by hand and used the visual studio to set the properties..
1
983
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 start/stop service commands and custom commands to the Windows service from ASP.NET Web site. What I have done is : * I read in a site that an web site user get credential of a user "Network Service" at the server so I run the service with...
0
9704
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10303
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9132
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5508
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4282
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.