Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXECUTING ONE APP AS ANOTHER CLOSES

Status
Not open for further replies.

majestyk

Technical User
Mar 31, 2001
26
US
I have a computer running win 98 that I need to do one
specific task.
I need the computer to boot to windows, Start an application, then when the application ends I need it to
start another application.

This isn't just a matter of placing them into the startup
folder. I need the second application to execute only when
the previous one ends and I have no clue how to do this.

Any help would be appreciatd!

Majestyk
 
Hi,

If your application is using MFC you could override the Apps ExitInstance() function and ShellExecute the other application.

HTH

William
Software Engineer
ICQ No. 56047340
 
How about a batch file like this:

START /WAIT app1.exe
START app2.exe

'Course I'm not sure if you can put a batch file in Startup.... "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
 
Ha! That batch file works fine.
Who'd of thunk it! Thanks for the help!!

-Maj
 
Hi,

The batch file approach is all very well and neat but is easily defeated, simply by editing the .bat file. Granted, it could be argued that the user simply needs to terminate the second process.

However, if the second process hasn't run to completion then a dialog can be displayed to this effect. 99% of users on seeing this will allow the application to complete.

Just a thought.

William
Software Engineer
ICQ No. 56047340
 
majestyk,
A grizzled old DOS guy would of thunk of that batch file...

williamu,
:)
I think only a grizzled old DOS guy would be brave enough to tinker with batch files. :)

'Course maybe I'm just too old and grizzled to consider that others might tinker with batch files. "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
 
I'm actually a grizzled old DOS user but I actually didn't think it would work. But as a last resort I tried it and it
did to my amazement.
Heck, I had no choice. A friend told me he could write a
routine in C++ in about 5 minutes that would do what I
wanted it too but it's been several weeks now and he keeps
saying 'Oh, not yet, no time.'

As for security, this computer needs none. This machine
will have a special interface and input control that will
not allow the user to end the batch process so it will work
just perfect for my needs.

Again, thank you very much.

-Maj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top