Shutdown NiFi on Windows
<p>Is there an easy programmatic way to shutdown NiFi on windows? The "manual" way works, run in a command window and press ctr-c to quit, but I'm trying to automate a testing environment. I can use the nifi.sh script on linux and I've seen reference to a shutdown bat script when googling but I'm using 0.6.1 and it isn't in that version.</p>

<p>I've used netstat to find the PID based on the API Port number and then killed that process. But it appears there are always two processes and one will restart the other. So I did the same thing, with the Bootstrap port, used it to find the PID of the process and then killed that process as well. But this hasn't always been reliable.</p>