How to restart my own application in VC ++

I am working on a VC ++ application.

Determining how to restart my own application

Can anyone show an example

+4
source share
2 answers

Write a program that will:

  • Wait for the completion of your application.
  • Run it again.

Call this program and then exit the application. This solution is widely used.


Another option:

Call your application with a specific parameter (e.g. / restarted). The new instance must wait for the old to complete before completing any tasks. Then turn off the old instance.

+3
source

I think you have not tried with Google. Here is an example project in codeProject. I think this is what you need.

How to create a self-healing application

0
source

All Articles