473,406 Members | 2,371 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,406 software developers and data experts.

Wait for app to finish

Hi group,

I have a solution with 2 apps. When i run 1 of the apps it starts by
checking for a file. If the file does not exist, it runs the other app
in the solution that generates the file.
This all works fine.

However, what I would like is that the 1st app runs the 2nd and then
freezes until it detects that the 2nd app exits. Is this possible?

--

Daniel
MCSE, MCP+I, MCP in Windows 2000/NT

--------------------------------------
remove the 2nd madrid from my mail address to contact me.
Nov 21 '05 #1
3 1069
"Daniel" <da****@madridmadridsoleado.com> schrieb:
However, what I would like is that the 1st app runs the 2nd and then
freezes until it detects that the 2nd app exits. Is this possible?


\\\
Imports System.Diagnostics
..
..
..
Dim p As Process = Process.Start(...)
p.WaitForExit()
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #2
Herfried K. Wagner [MVP] wrote:
"Daniel" <da****@madridmadridsoleado.com> schrieb:
However, what I would like is that the 1st app runs the 2nd and then
freezes until it detects that the 2nd app exits. Is this possible?

\\\
Imports System.Diagnostics
..
..
..
Dim p As Process = Process.Start(...)
p.WaitForExit()
///

Excellent thanks! I'll give it a try!

--

Daniel
MCSE, MCP+I, MCP in Windows 2000/NT

--------------------------------------
remove the 2nd madrid from my mail address to contact me.
Nov 21 '05 #3
Maybe this can help you, make a app2.bat file underr c:\
in the bat file type: pause
Save the file
then put a button on a form and add this to the forms click event

Shell("c:\app2.bat", AppWinStyle.NormalFocus, True)
MsgBox("App2 finished")

I think this is what you want

hth Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.
"Daniel" <da****@madridmadridsoleado.com> schreef in bericht
news:uR**************@TK2MSFTNGP14.phx.gbl...
Hi group,

I have a solution with 2 apps. When i run 1 of the apps it starts by
checking for a file. If the file does not exist, it runs the other app
in the solution that generates the file.
This all works fine.

However, what I would like is that the 1st app runs the 2nd and then
freezes until it detects that the 2nd app exits. Is this possible?

--

Daniel
MCSE, MCP+I, MCP in Windows 2000/NT

--------------------------------------
remove the 2nd madrid from my mail address to contact me.

Nov 21 '05 #4

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

Similar topics

2
by: Jordan S | last post by:
I have written a small Console application that executes the following line, amongst other things: System.Diagnostics.Process.Start(currentWorkingDirectory + @"\backup_files.cmd"); My Console...
11
by: Peter Kirk | last post by:
Hi there I am looking at using a thread-pool, for example one written by Jon Skeet (http://www.yoda.arachsys.com/csharp/miscutil/). Can anyone tell me if this pool provides the possibility to...
2
by: Ewa Sowa | last post by:
I'm using CeCreateProcess to run a program that installs myApp.exe on my Pocket PC. If myApp is already installed, a dialog box pops up asking if you want to reinstall. Right after myApp.exe is...
4
by: Mohsen Aghazadeh | last post by:
In my application I wait for a shelled application to finish and continue to work. Everything works fine but when the shelled program is up and user tries to open other applications (outside of my...
2
by: Aaron Ackerman | last post by:
I have a very small console taks that i perform at the very beginning of running my app for the first time. I want to be able to wait until this Process is finished and then initiate a reboot of...
15
by: Snuyt | last post by:
Hello, I want the program to wait a few seconds between executing code. It should look something like this: public sub xx() ...code... wait(2) 'wait 2 seconds ...code...
4
by: Prasad | last post by:
Hello, I have two threads T1 and T2. T2 starts thread T1 and waits for 1 minute for T1 to finish (using Join) and if it doesn't finish within that time, it aborts the thread T1. Now, I...
18
by: Coder | last post by:
Howdy everybody! How do I do the following... while (myVary != true){}; Obviously I do not want to use 100% of the processor to stay in this infinite loop till myVar == true. But wait do I...
5
by: Jim | last post by:
I have a form in an Access 2003 db that calls (using shell - thanks to this newsgroup) a Vb.net program I wrote to parse a text file. The call works fine. The VB parses the file correctly. How...
5
by: rickbytes | last post by:
Hello, Is there a way to make my vb code to wait for a mysql query to finish executing before trying to run a new query? For example: Is there a way I can run a CREATE TEMPORARY TABLE _mytable...
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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...

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.