Are you waiting for the service to actually stop? When you call
ServiceController.Stop(), it's really just issuing the stop command.
You'll need to loop, calling .Refresh() and then checking .Status.

-Brad

On Tue, 30 Nov 2004 13:36:47 -0500, Hamza Zeen-Aldin
<[EMAIL PROTECTED]> wrote:
> I am using the servicecontroller to stop and start services on multiple
> servers. The problem is that when I stop a service and try to update the
> files it takes a while for the service to release the handle on those
> files. I used the sleep task but it does not work all the time even if I
> set the period as high as 15 sec. Is there any way to get around this? I
> sat the time interval on the sleep taks high but it does not work all
> the time. I need in some way to check if the files used by the service
> are ready to be deleted/updated and then proceed with my update.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to