Hi Honas, Try it without the /c. taskkill and timeout are a executables so I don't think you need the /c form.
Isn't it funny how visual studio doesn't even work well with itself? :) This works for me: command=['taskkill', '/f', '/im', 'mspdbsrv.exe'], In case you need to use /c for something: command=['cmd.exe', '/c', 'del /s *.pak *.key *.cfg *.manifest *.pak.solid'] Notice the last string isn't broken up so everything after the /c will be quoted. -Greg -----Original Message----- From: users [mailto:[email protected]] On Behalf Of Dan Kegel Sent: Friday, April 01, 2016 8:57 AM To: honas grael Cc: [email protected] Subject: Re: [[email protected]] Killing a windows task(process) using taskkill from the shellcommand FWIW, I invoke a script for my build steps, and it has the line taskkill /F /IM mspdbsrv.exe /T in it. Works great. While it may seem strange to put the build logic in a script (or batch file) rather than in build steps, it sure makes debugging easier. On Fri, Apr 1, 2016 at 8:28 AM, honas grael <[email protected]> wrote: > Hi Everyone, > > I don't know if i'm doing it worng but I have an executable task that > I want to kill at the end of my build. > > It seems easy enough to start the executable using something along the > lines of > > factory.addStep(steps.ShellCommand( > > command=["run_my_custom_executable.exe","config_file_for_executable.txt"], > logfiles={"triallog": {"filename": "c:\\temp\\test.log", > HaltOnFailure=True)) > > I want to kill that executable, so I have tried > > factory.addStep(steps.ShellCommand(command=["cmd /c taskkill /im > run_my_custom_executable.exe /f /t])) > > but no joy so far, though the command works fine when I type it > directly into the Windows command shell. > > > Also I wanted to introduce a time delay between steps so I thought I'd > use the Windows timeout shell command > > > factory.addStep(steps.ShellCommand(command=["cmd /k timeout 30 > /nobreak])) > > What am i missing? > > > > Regards > > > > > _______________________________________________ > users mailing list > [email protected] > https://lists.buildbot.net/mailman/listinfo/users _______________________________________________ users mailing list [email protected] https://lists.buildbot.net/mailman/listinfo/users _______________________________________________ users mailing list [email protected] https://lists.buildbot.net/mailman/listinfo/users
