Post your question to a community of , developers. Sign in Join Now. New Post. 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 Reference in the start menu is the only way to access it.
I have the following code used to start the other program: System.
What is the problem here? One thing I have noticed is that the ClickOnce application only shows up in Task Manager under the Processes window, not the Application window. I also tried adding a call to Process.
Perhaps krwq stephentoub know. Ask a Question. Are you running in a container? Notify me of new posts via email. You are commenting using your Facebook account. ErrorDataReceived and.
GetProcesses to see all the processes on the system. I do NOT see that process in the array returned. Should I see a process with the name of App1.
Thanks for the help, Chris. Follow Post Reply. Today I put in a Thread. Sleep xxx call before I go get the processes with GetProcesses and it is finding my App1 process. Start , but that isn't working.
WaitForExit(Int32). Instructs the Process component to wait the specified number of milliseconds for the associated process to exit.
If someone knows why, I would still like an answer. Thanks, Chris Chris wrote: Hello, I have a Windows Forms application which has buttons to click to run other programs. This discussion thread is closed Start new discussion.
Visual Basic. Hiding process DOS boxes, How? WaitForExit and Windows 98 Problem. WaitForExit: No process is associated with this object. Waiting for process end , how?
As the process writes a line of text, we will have just that line in memory, and it will get garbage-collected after we update our counter. The first is process. This is a classic race condition - in between the time our process returns from process.
WaitForExit and invokes process. Kill , the target process can exit.
In this case, MSDN states that if you call. Kill on a process that has already exited, you will get an InvalidOperationException.
The second "gotcha" is very subtle, and you probably won't find it until either the function doesn't return the result you expect, or until you sit down and read the entire documentation page for Process. WaitForExit int. MDSN states that:.