Board index » delphi » Re: Restart application

Re: Restart application


2003-08-16 08:28:07 PM
delphi127
Samuel Genheden writes:
Quote
Hey!

Is there a way to restart my application, so it is terminating but executing
again after a few seconds?
You could create a one-off scheduled task before your app closes,
or use a second "loader" application:
1. Execute loader.exe
2. Close main app
3. loader.exe waits for a few seconds, executes main app and closes
Why?
--
jc
Remove the -not from email
 
 

Re: Restart application

Hi All,
There are independent applications App1, App2, App3, App4.
Each application may somtimes separately decide that it must be closed and
then restarted immediately without any dialogue. How to make restart?
Thanks
Ivan Kossey
 

Re: Restart application

This isn't an OTA question. But really it is just a matter of
ShellExecuteEx() Application.ExeName/ParamStr(0) and then closing the
current app.
"Ivan Kossey" <XXXX@XXXXX.COM>writes
Quote
Hi All,

There are independent applications App1, App2, App3, App4.

Each application may somtimes separately decide that it must be closed and
then restarted immediately without any dialogue. How to make restart?

Thanks
Ivan Kossey



 

Re: Restart application

i was wondering is there anyway that i can force the application
to restart?there is nothing like Application->Restart(),only
Application->Terminate,i want to force the application to
terminate and then start again.Thanks
 

Re: Restart application

With WinExec or CreateProcess you can start a new copy of the program and
then end the current one.
. Ed
Quote
user writes
news:469831a2$XXXX@XXXXX.COM...

i was wondering is there anyway that i can force the application
to restart?there is nothing like Application->Restart(),only
Application->Terminate,i want to force the application to
terminate and then start again.Thanks
 

Re: Restart application

"Ed Mulroy [TeamB]" <XXXX@XXXXX.COM>writes
Quote
With WinExec or CreateProcess you can start a new
copy of the program and then end the current one.
To add to that, the call to WinExec/CreateProcess() it usually done from a
second application that the main application runs at shutdown. The second
application waits for the main application to fully exit before then
re-running the main application. This way, the main application only has
one instance running at a time without any overlap.
Gambit