Hi,
Do you realize the contradiction in your statement?
You want to write a code that stops itself and then restart again
Having said that, you can use an external process to do it. if your win
service spawn a process then this process can stop the service, do what you
need and restart the service.
You use ServiceControlManager for that.