views:

18

answers:

1

Does anyone know how to get the PID of the process that a windows service is running in from Nant?

I am having file locking problems. I issue a stop command to the service and then try and delete the Windows service's files. However these are quite often locked by the process that the Windows service is running in. I want to find the PID so that I can wait for it to terminate before deleting.

Thanks

A: 

You might have to create a custom nant task to do this. However you might want to see about just adding maybe a delay like 1 min or something before you try to replace your files. Might be easier.

Joshua Cauble