Re: Need batch file help

Tech-Archive recommends: Speed Up your PC by fixing your registry




"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.


.



Relevant Pages

  • Re: Command Line
    ... How do I call it from a batch file? ... > If your keyboard software does not support this long path, ... > Thanks...that worked for help and support. ... >> the command line or folder that these programs reside in. ...
    (microsoft.public.windowsxp.general)
  • Re: Mapping a Drive
    ... >batch file. ... at a DOS prompt for more help or scan the Help & Support for this ... command. ...
    (microsoft.public.windowsxp.basics)
  • Re: Mapping a Drive
    ... >batch file. ... at a DOS prompt for more help or scan the Help & Support for this ... command. ...
    (microsoft.public.windowsxp.basics)
  • DoD supports Atlantis shuttle mission (Forwarded)
    ... North American Aerospace Defense Command ... DoD supports Atlantis shuttle mission ... U.S. Northern Command is the focal point for military emergency support to ... Air Force, Navy, Marine Corps and Coast Guard aircraft and Coast Guard ships ...
    (sci.space.news)
  • DoD supports Atlantis shuttle mission (Forwarded)
    ... North American Aerospace Defense Command ... DoD supports Atlantis shuttle mission ... U.S. Northern Command is the focal point for military emergency support to ... Six F-16s from the U.S. Air Force, ...
    (sci.space.shuttle)