473,472 Members | 2,155 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Process.WaitForExit doesn't apply


Hello,

I have a program that run notepad like this:
ProcessStartInfo myP = new ProcessStartInfo();

myP.FileName = "notepad.exe";

using(Process myp = new Process()){
myp.StartInfo = myP;
try{
myp.Start();
myp.WaitForExit();
Console.WriteLine("alles guttes");
}
catch{
Console.WriteLine("fail");
}
}

This is working fine, "alles guttes" will be executed after I close
Notepad.
But when I change the "notepad.exe" with third party vendor software which
processing files and so on, "alles guttes" directly appear and it seems
myp.WaitForExit is not working.

Am I miss something?

Pujo

--
Just Relax, and Do It
Nov 16 '05 #1
2 3048
Pujo Aji wrote:

Hello,

I have a program that run notepad like this:

<snip>

Perhaps that other program spawns other programs itself and immediately
quit ?

--
Lasse Vågsæther Karlsen
http://www.vkarlsen.no/
mailto:la***@vkarlsen.no
PGP KeyID: 0x0270466B
Nov 16 '05 #2

Hi,

I found that my third party program doesn't exist in task manager
application, but do exist in task manager process.

And if I use notepad, notepad exists in task manager application. Is this
the reason that I can't understand when it stops.

Is there any way out to track this program?

Sincerely Yours,
Pujo

On Sat, 22 Jan 2005 15:02:55 +0100, Lasse Vågsæther Karlsen
<la***@vkarlsen.no> wrote:
Pujo Aji wrote:
Hello,
I have a program that run notepad like this:

<snip>

Perhaps that other program spawns other programs itself and immediately
quit ?


--
Baby Step, One Step at a time, better and better....
Nov 16 '05 #3

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

Similar topics

3
by: James Li | last post by:
I have the code below, the first process takes about 10 minutes to finish. But the waitForExit doesn't seem to wait when I debug the program, it go immediately to execute code after the...
10
by: Tony | last post by:
I am running an application called AcroComm.exe to poll time clocks here at our company. I have written a small C# app that will poll the clocks based on information found in a DB. My problem is...
1
by: Wojtek | last post by:
Hi, I am having problems to fetch the output of a command line program from an ASP.NET application. My code works fine in a regular Forms or command line application, but when running the same...
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...
15
by: jcrouse | last post by:
Here is my code: Dim sw As StreamWriter = File.CreateText(Application.StartupPath & "\mameversion.bat") sw.WriteLine(lblMameExePath.Text & " -help >""" & Application.StartupPath &...
2
by: Terry Olsen | last post by:
Using the following code, I get the error "No process is associated with this object" when calling the WinZip.WaitForExit() method. After I click the "Break" or "Continue" button on the dialog,...
5
by: andrew | last post by:
Hi, I have the following issue with the Thread.Abort(): The main thread creates a worker thread which waits on a process termination. void ThreadProc() { Process proc =...
2
by: test3 | last post by:
Hello folks, I'm using System.Diagnostics.Process to start a thirdparty program (that works perfectly when started via command line). I'm using Process.StandardOutput to get the output of the...
4
by: Steven De Smet | last post by:
Hello, This is my first post. I searched on the internet for answers but I was unable to solve my problem. So I hope that you guy's can help me with my VB.NET problem I tried to create a...
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...
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...
1
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...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.