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

WaitForExit doesn't wait

I am trying to use WaitForExit to determine when an external application I
have launched has exited (duh!). I found examples everywhere and it
seemed simple and this works perfectly:

Dim myProcess As Process = _
System.Diagnostics.Process.Start("notepad.exe")

' wait until it exits
myProcess.WaitForExit()

MessageBox.Show("Notepad was closed at: " & _
myProcess.ExitTime & "." & _
System.Environment.NewLine & "Exit Code: " & _
myProcess.ExitCode)
myProcess.Close()

However, when I substitute the application I want to run for
"notepad.exe", the application runs, but WaitForExit returns immediately.

The application in question is synplify_pro.exe, a synthesis tool that
seems, at first glance, to be a normal windows application.

Any ideas on what is going on here? Any workarounds?
Terry Brown

Nov 21 '05 #1
4 2534
try
Shell("notepad", AppWinStyle.NormalFocus, True)

Nov 21 '05 #2
try
Shell("notepad", AppWinStyle.NormalFocus, True)

Nov 21 '05 #3
Terry,
I have never tried synplify_pro.exe, however is it a "launcher", that starts
the real exe under the covers then exists right away? Hence the effect you
are seeing?

Do you see synplify_pro.exe listed in Windows Task Manager?

Hope this helps
Jay

"Terry Brown" <tt****@yahoo.com> wrote in message
news:pa****************************@yahoo.com...
I am trying to use WaitForExit to determine when an external application I
have launched has exited (duh!). I found examples everywhere and it
seemed simple and this works perfectly:

Dim myProcess As Process = _
System.Diagnostics.Process.Start("notepad.exe")

' wait until it exits
myProcess.WaitForExit()

MessageBox.Show("Notepad was closed at: " & _
myProcess.ExitTime & "." & _
System.Environment.NewLine & "Exit Code: " & _
myProcess.ExitCode)
myProcess.Close()

However, when I substitute the application I want to run for
"notepad.exe", the application runs, but WaitForExit returns immediately.

The application in question is synplify_pro.exe, a synthesis tool that
seems, at first glance, to be a normal windows application.

Any ideas on what is going on here? Any workarounds?
Terry Brown


Nov 21 '05 #4


On Fri, 28 Jan 2005 10:37:53 -0600, Jay B. Harlow [MVP - Outlook] wrote:
Terry,
I have never tried synplify_pro.exe, however is it a "launcher", that starts
the real exe under the covers then exists right away? Hence the effect you
are seeing?

Do you see synplify_pro.exe listed in Windows Task Manager?

Hope this helps
Jay

Interesting. synplify_pro.exe does not appeat in task manager.
synplify_pro is an enhanced version of synplify.exe and must run, enable
it's extra features in some mystical manner, then run synplify.exe (which
appears in task manager) and then exit.

thanks for the tip.

Terry
"Terry Brown" <tt****@yahoo.com> wrote in message news:pa****************************@yahoo.com...
I am trying to use WaitForExit to determine when an external application
I
have launched has exited (duh!). I found examples everywhere and it
seemed simple and this works perfectly:

Dim myProcess As Process = _
System.Diagnostics.Process.Start("notepad.exe")

' wait until it exits
myProcess.WaitForExit()

MessageBox.Show("Notepad was closed at: " & _
myProcess.ExitTime & "." & _
System.Environment.NewLine & "Exit Code: " & _
myProcess.ExitCode)
myProcess.Close()

However, when I substitute the application I want to run for
"notepad.exe", the application runs, but WaitForExit returns
immediately.

The application in question is synplify_pro.exe, a synthesis tool that
seems, at first glance, to be a normal windows application.

Any ideas on what is going on here? Any workarounds?
Terry Brown



Nov 21 '05 #5

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

Similar topics

0
by: Brady Kelly | last post by:
I have a small C# application that is supposed to install MSDE Rel A and then run my application's install. I start the MSDE setup.exe using Process.Start, and then wait for it using...
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...
2
by: Pujo Aji | last post by:
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;...
4
by: Christian Billig | last post by:
Hi, well i've a problem and i don't know how to solve it. I wrote a function, which starts a Process for a user by using the API CreateProcessWithLogon. Afterwards i want to know if the...
0
by: Terry Brown | last post by:
I am trying to use WaitForExit to determine when an external application I have launched has exited (duh!). I found examples everywhere and it seemed simple and this works perfectly: Dim...
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,...
1
by: Chris | last post by:
Hello, I have a Windows Forms application which has buttons to click to run other programs. One of the applications it must run is a ClickOnce Windows Forms application, so the Application...
4
by: Alistair George | last post by:
How permanent is WaitForExit(); ? I mean is there anything/ an alternative one can do to break the wait otherwise I will run my thread in a separate function, and control it by global variables....
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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: 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
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
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
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...

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.