Forum > General

Restart application

<< < (2/3) > >>

Lulu:
Hello, just an 2 cents idea...
Application1 launches application2 and waits for it to finish.
Application2 is the real application used by the user.
When application2 needs to restart, it signals it to application1 by a tag in a file for example or by pipe communication, then finishes.
The application1 detects the end of the application2, reads the file or the pipe and if necessary restarts the application2.
This is a bit far-fetched, of course...

Mr.Madguy:

--- Quote from: Lulu on November 27, 2021, 05:58:39 pm ---Hello, just an 2 cents idea...
Application1 launches application2 and waits for it to finish.
Application2 is the real application used by the user.
When application2 needs to restart, it signals it to application1 by a tag in a file for example or by pipe communication, then finishes.
The application1 detects the end of the application2, reads the file or the pipe and if necessary restarts the application2.
This is a bit far-fetched, of course...

--- End quote ---
This is called launcher. Yeah, it's good solution. Only problem - anti-viruses don't like CreateProccess. And it's needed to wait for application 2 to terminate.

Emerson:
Thanks everyone for your help, I will test them all and answer the result here.

Zvoni:

--- Quote from: Mr.Madguy on November 28, 2021, 06:01:44 am ---This is called launcher. Yeah, it's good solution. Only problem - anti-viruses don't like CreateProccess. And it's needed to wait for application 2 to terminate.

--- End quote ---
Then shell it instead of CreateProcess

PascalDragon:

--- Quote from: Mr.Madguy on November 28, 2021, 06:01:44 am ---This is called launcher. Yeah, it's good solution. Only problem - anti-viruses don't like CreateProccess. And it's needed to wait for application 2 to terminate.

--- End quote ---

Everything that starts a process uses CreateProcess (even ShellExecute uses it under the hood). Anti-viruses merely hook it so that they can scan started binaries before they start running.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version