How to 'restart' application on exit?

  • Thread starter Thread starter mdb
  • Start date Start date
M

mdb

Anyone have a suggestion for how to restart my appliacation when I exit?

I'm not talking about a looping batch file - I need my program to have the
ability to restart or not restart. Also, I can't just use Process.Start
because the program is a single-instance program, and I can't guarantee how
long the shutdown process will take (possibly a few seconds). I suppose I
could pass a parameter to the program in Process.Start to bypass the single
instance check, but I guess I'm looking for a more elegant solution, if it
exists...

-mdb
 
Create a service, and start the exe if the exe isn't running. That way you
can stop the service if you ont want the app to restart.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
 
Back
Top