473,661 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.NET & the command prompt

Hi.

I don't know if this possible but how would you do it if
you wanted to send commands til the comman prompt (and
preferrably also receive the output from the command
prompt - though not necessary!) ?

I need to send a number of commands to the command prompt
and I can't really use the System.Diagnost ics.Process
class.

Kim Ipsen
Jul 21 '05 #1
3 1852
Why can't you use Process? You can redirect the standard input, output and
error, so you can read/write to the process. Can you give us an example of
what you want to do and why it's not working?
-mike
MVP

"Kim Ipsen" <an********@msn .com> wrote in message
news:01******** *************** *****@phx.gbl.. .
Hi.

I don't know if this possible but how would you do it if
you wanted to send commands til the comman prompt (and
preferrably also receive the output from the command
prompt - though not necessary!) ?

I need to send a number of commands to the command prompt
and I can't really use the System.Diagnost ics.Process
class.

Kim Ipsen

Jul 21 '05 #2
Hi Kim,

Mike is correct that you can redirect the input/output in ProcessStartInf o.
Please refer to the following sample for detailed information:

Redirecting Standard Input/Output using the Process Class
http://www.c-sharpcorner.com/Referen...ic.Process.asp

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #3
Thanks for all your help :o)

I now have something to work with :o)

//Kim Ipsen

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #4

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

Similar topics

0
2391
by: Brano Zarnovican | last post by:
Hi ! I'd like to init curses and still have working Python interactive command line. I found that you can replace stdin/stdout/stderr like this: #!/usr/bin/python -i import curses import sys
4
2565
by: Andi | last post by:
Greetings all, I wish to include an ASP calendar that connects to a back-end MS Access database on a web page, to be run from my computer (running WinXP Pro, with IIS5). I have downloaded a free calendar that fits the description from the internet, and followed the install proceedures included in the documentation, however when I enable the web site, and navigate to the folder where the calendar is, instead of loading "default.asp" (the...
2
2728
by: Herb Stevenson | last post by:
Hello all. I need to set up a batch file to work w/ the Visual Studio.NET 2003 command prompt. However, when I run the batch file it uses the standard command prompt. Is there a way to differentiate batch files between the two prompts? Also, where might I find information on the differences between the 2 prompts? Thanks, Herb
4
2523
by: glenn | last post by:
I keep reading all sorts of books on VS that keep telling me to click on Tools/Visual Studio Command prompt to run this program or that program. However, I do not have such a menu choice. Where is this menu? thanks, glenn
3
270
by: Kim Ipsen | last post by:
Hi. I don't know if this possible but how would you do it if you wanted to send commands til the comman prompt (and preferrably also receive the output from the command prompt - though not necessary!) ? I need to send a number of commands to the command prompt and I can't really use the System.Diagnostics.Process class.
6
10022
by: Geoffrey S. Knauth | last post by:
It's been a while since I programmed in C++, and the language sure has changed. Usually I can figure out why something no longer compiles, but this time I'm stumped. A friend has a problem he hoped I could solve, and I couldn't. Some code he's using, written in 1999, that compiled fine in 1999, no longer does in 2006 with g++ 4. This little bit of code: SimS::SimS (ostream &s) {
3
5104
by: kimiraikkonen | last post by:
Hi experts, I just want to ask a simple procedure of my simple form. My form has a input textbox and a button. I want this if you can help me: Application user types a command prompt command like "dir" into "textbox", then after clicking "button", command prompt(cmd) should run with the prompt that user has written already into "textbox" .
2
1376
by: sunarb | last post by:
i dont know how to run and view the out of the procedures created in sql command prompt in windows xp.please guide me. ex:how to view the out put of dbms_output.put_line("Hello"); on the sql command prompt.
0
8428
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
8341
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8542
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
7362
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...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2760
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
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1740
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.