PC Review


Reply
Thread Tools Rate Thread

Running a command line process

 
 
=?Utf-8?B?aHBsbG95ZA==?=
Guest
Posts: n/a
 
      10th Jun 2004
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?


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      10th Jun 2004
* "=?Utf-8?B?aHBsbG95ZA==?=" <(E-Mail Removed)> 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/>
 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      10th Jun 2004
Answered by Jon Skeet in dotnet.general


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line utility to list processes with the "command line that was used to start the process" flahmeshess Microsoft Windows 2000 5 12th Oct 2006 02:46 AM
what permissions does a windows service need to execute another process? System.Diagnostics.Process process = System.Diagnostics.Process.Start(info); just local administrator? any specific permitions? Daniel Microsoft Dot NET Framework 1 13th Apr 2006 04:56 AM
what permissions does a windows service need to execute another process? System.Diagnostics.Process process = System.Diagnostics.Process.Start(info); just local administrator? any specific permitions? Daniel Microsoft Windows 2000 0 12th Apr 2006 11:47 PM
what permissions does a windows service need to execute another process? System.Diagnostics.Process process = System.Diagnostics.Process.Start(info); just local administrator? any specific permitions? Daniel Microsoft C# .NET 0 12th Apr 2006 11:47 PM
what permissions does a windows service need to execute another process? System.Diagnostics.Process process = System.Diagnostics.Process.Start(info); just local administrator? any specific permitions? Daniel Microsoft Dot NET 0 12th Apr 2006 11:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:47 AM.