[users at bb.net] Killing a windows task(process) using taskkill from the shellcommand

honas grael honasgraeymael at gmail.com
Fri Apr 1 18:55:53 UTC 2016


Thanks guys. Really appreciate it. Will give it a try next week.

On Fri, Apr 1, 2016 at 7:35 PM, Greg MacDonald <gmacdonald at trionworlds.com>
wrote:

> 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:users-bounces at buildbot.net] On Behalf Of Dan Kegel
> Sent: Friday, April 01, 2016 8:57 AM
> To: honas grael
> Cc: users at buildbot.net
> Subject: Re: [users at bb.net] 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 <honasgraeymael at gmail.com>
> 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
> > users at buildbot.net
> > https://lists.buildbot.net/mailman/listinfo/users
> _______________________________________________
> users mailing list
> users at buildbot.net
> https://lists.buildbot.net/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20160401/e957ffe5/attachment.html>


More information about the users mailing list