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.
--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"MikeZ" <Mi***@discussions.microsoft.comwrote in message
news:71**********************************@microsof t.com...
>I mean that write code in windows service application to restart itself. It
does not include to restart service from second application or command
line.
"Hans Kesting" wrote:
>MikeZ explained :
How Can Windows Service Application Reatarts itself? Thanks.
Control Panel Administrative Tools Services
select your service
right-mouse properties
"Recovery" tab
Hans Kesting