Re: Need batch file help
- From: "Pegasus \(MVP\)" <I.can@xxxxxxx>
- Date: Wed, 28 Dec 2005 18:13:20 +1100
"tech" <techgrh@xxxxxxxxx> wrote in message
news:1135751520.481843.310620@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I had read that XP home does not support tasklist and taskkill.
> But just to be sure, I typed them at the command prompt, and they were
> not recognized. I think the && symbols are not supported either.
>
> I found pstools and am now trying pskill and pslist, but no luck
> converting to your command yet.
>
> Looks like you're checking for IEexplore in the task list, and passing
> the image name to taskkill if not found? I'm guessing this command
> would keep searching until IExplore is not found, and then continue to
> the next line in the batch file?
>
> Another weird thing is that IExplore.exe is not listed in the process
> list while running. That really confused me!
>
As Ramesh pointed out, tasklist.exe and taskkill.exe may not
be included in WinXP Home.
Using the tools from SysInternals, the batch file is much the
same as before:
@echo off
c:\tools\pslist | find /i "iexplore" && c:\tools\pskill sometask.exe
Now I'm convinced that the && operator is supported
under WinXP. However, if you insist then you can run
the same batch file without it:
@echo off
c:\tools\pslist | find /i "iexplore"
if not ErrorLevel 1 c:\tools\pskill sometask.exe
What makes you think that iexplore.exe is not listed in
the task list when it's active? Please explain!
Lastly, to test your batch file properly you must run it from
a Command Prompt and ***not*** from the Run box.
When you Run it from the run box then you deprive yourself
of any feedback you might get, which is a terrible way of
testing a batch file while in unfamiliar territory.
.
- Follow-Ups:
- Re: Need batch file help
- From: tech
- Re: Need batch file help
- References:
- Need batch file help
- From: tech
- Re: Need batch file help
- From: Pegasus \(MVP\)
- Re: Need batch file help
- From: tech
- Need batch file help
- Prev by Date: Re: XP OEM License Questions. Mistakes? Mobo Repair? Refund?
- Next by Date: Re: XP OEM License Questions. Mistakes? Mobo Repair? Refund?
- Previous by thread: Re: Need batch file help
- Next by thread: Re: Need batch file help
- Index(es):
Relevant Pages
|