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

Performing command prompt commands from within an application

Hi there

My question is: How do I perform a command line command from within a windows form/class etc. ?

Not any specific command yet, but any examples would be appreciated, so far I've just been testing with a simple exe file, so trying to invoke "c:\test.exe" from inside the code.

I tried just using the Console.WriteLine("c:\\test.exe"); but that didnt do the trick

Regards Thomas
Mar 13 '07 #1
3 1047
shweta123
692 Expert 512MB
Hi,

You can run your exe as
System.Diagnostics.Process.Start("c:\test.exe")
Mar 13 '07 #2
Yeah thanks.

But I guess it was me who expressed myself unclear. I only tested with an .exe file so far because it is easy to see if it gets executed, in my final application it wont call exe files, it will perform UNC commands on remote machines.

So I'd like to be able to send any given command to the prompt.
Mar 13 '07 #3
shweta123
692 Expert 512MB
Hi,

You can run any command or application that can be run from the Command Prompt.
Mar 13 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Raf | last post by:
Hello to the pros, I have to create an application that performs a "Ping" to an IP-address. The result (successfull or not successfull) should be captured by the application and should be shown...
9
by: Atley | last post by:
I am looking for a way to run DOS-type commands from within a VB.net 2003 application. I also need to be able to answer questions (ie 'Are You Sure') that the command line may require. ...
4
by: Randy | last post by:
Hello, I'm trying to find out if it is possible, and if so...how to accomplish issuing a PLSQL command from within C#. The command is... SET SCAN OFF; What is happening is I'm trying to...
34
by: Roman Mashak | last post by:
Hello, All! I'm implementing simple CLI (flat model, no tree-style menu etc.). Command line looks like this: <command> <param1> <param2> ... <paramN> (where N=1..4) And idea is pretty simple: ...
6
by: Shooter4Life8 | last post by:
Hi, I am having trouble figureing out the best way to open a command prompt then write lines to it in VB.NET. Currently I have this code, but it execute's too fast I think because Dim psi As...
4
by: no_spam_for_gman | last post by:
Hi, I can turn off autocommit within the command window but I cannot figure out how to turn it off when you are in the IBM DB2 Command Line Processor. Does anybody knows how? By the way I mean...
4
by: Peter Nimmo | last post by:
Hi, I am writting a windows application that I want to be able to act as if it where a Console application in certain circumstances, such as error logging. Whilst I have nearly got it, it...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
2
by: aditi1184 | last post by:
Hi, I am trying to use the 'find' command of twill from within a python code but it seems to return no result. I tried to run that command on the command prompt by running twill and it works fine....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
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...

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.