I write in the section "Exec command" of the Publish Over SSH Plugin:
cmd /c call C:\sftp\myscript.bat $BUILD_NUMBER
The content of the file myscript.bat is as follow:
Echo shutdown tomcat(use port 8080)
for /f "delims= tokens=1" %%i in ('netstat -aon ^| findstr "8080"') do (
taskkill /f /pid "Unable to render embedded object: File (~71,5) not found."
Echo startup tomcat
issue reproduced as follow steps:
1.jenkins execute myscript.bat file successfully.
2.log on the windows server 2008 machine which the ssh server & tomcat is on.
3.i find a window is prompt,this window is "Interactive Services Detection"
4.i don't know why this window is pop up,can you give me suggestion?i also attach 3 images to explain this question.