title: Nant: Process id of a service that is already running
body: <p>Does anyone know how to get the PID of the process that a windows service is running in from Nant?</p>
  
  <p>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.</p>
  
  <p>Thanks</p>