473,394 Members | 1,739 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,394 software developers and data experts.

.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.Diagnostics.Process
class.

Kim Ipsen
Jul 21 '05 #1
3 1831
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.Diagnostics.Process
class.

Kim Ipsen

Jul 21 '05 #2
Hi Kim,

Mike is correct that you can redirect the input/output in ProcessStartInfo.
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
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...
4
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...
2
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...
4
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...
3
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...
6
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...
3
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...
2
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...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
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...
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.