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

Running a command line process

Hi I want my VB.NET application to run a command from the command line and then wait for the command to finish before continuing.

I am currently using

System.Diagnostics.Process.Start(strApp)

where strApp is the the command line text.

However this method starts a new process and therefore my application continues without waiting.

Any ideas?
Nov 20 '05 #1
2 4056
* "=?Utf-8?B?aHBsbG95ZA==?=" <hp*****@discussions.microsoft.com> scripsit:
Hi I want my VB.NET application to run a command from the command line and then wait for the command to finish before continuing.

I am currently using

System.Diagnostics.Process.Start(strApp)

where strApp is the the command line text.

However this method starts a new process and therefore my application continues without waiting.


\\\
Imports System.Diagnostics
..
..
..
Dim p As Process = Process.Start("C:\foo.exe")
p.WaitForExit()
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
Answered by Jon Skeet in dotnet.general
Nov 20 '05 #3

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

Similar topics

1
by: hplloyd | last post by:
Hi i want my VB.NEt application to run a seperate application from the command line, and then wait until this application has completed before continuing I am currently using ...
7
by: Ross Presser | last post by:
OK, I've been researching this problem and can't find a definitive answer yet. The situation is one that seems to have come up a few times to different folks. I am writing an application that...
10
by: Mandy | last post by:
I have a command line tool that I would like to run from my .NET web application using System.Diagnostics.ProcessStartInfo. I run cmd.exe with this and then pass the command to run the tool as an...
0
by: WATYF | last post by:
This is my problem... I have some code that starts a Process and returns it to a variable... (prcBat) At any time while that process is running... I want to be able to Kill it by pressing a...
3
by: ° ^F®êâK^ ° | last post by:
Blank hi there, I just want to explain my problem. There is an application which is coded by me running. It is an vb.net application having user controls windows forms and something like visual...
2
by: pamela fluente | last post by:
I have an application running. A file type is registered with this application. When the user click on a file of such type a new instance of the application is loaded with command line (file name)....
51
by: Ojas | last post by:
Hi!, I just out of curiosity want to know how top detect the client side application under which the script is getting run. I mean to ask the how to know whether the script is running under...
6
by: tvaughan77 | last post by:
Hi, I have some code that I want to use to run a command line utility and I want to be able to run it from an aspx page running under IIS. The command line utility is a local utility running on...
4
by: garykenneally | last post by:
Hi, Im trying to run a command line application from C# but i having some strange problems with it. Heres the code im using: System.Diagnostics.Process process = new...
1
by: Claire | last post by:
Hi, I'm trying to run mysqldump.exe from my c# application, running on windows vista with visual studio 2005. The following code does not produce the output file. The same line used in a 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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.