Discussion:
Bug in tasklist output
(too old to reply)
Tom Del Rosso
2022-01-07 13:18:49 UTC
Permalink
I've noted before that when you pipe tasklist to FIND, it often (maybe
usually), fails to see some of the output unless there is another
program in between. This could be SORT or any other stdin/stdout
program.

For example, the first line sees firefox, but the second line usually
doesn't see it.
tasklist|sort|find /i "firefox"
firefox.exe 3908 Console 0 1,269,432 K
tasklist|find /i "firefox"
[usually no output]

Now, I just wanted to follow up with the observation that if you run
this repeatedly you get output that is truncated in a different way each
time:

tasklist|find /v "xxxx"

This gives a little insight into the bug. WMIC can also give a task list
but I haven't tested it much.
--
Defund the Thought Police
JJ
2022-01-08 05:54:49 UTC
Permalink
Post by Tom Del Rosso
I've noted before that when you pipe tasklist to FIND, it often (maybe
usually), fails to see some of the output unless there is another
program in between. This could be SORT or any other stdin/stdout
program.
For example, the first line sees firefox, but the second line usually
doesn't see it.
tasklist|sort|find /i "firefox"
firefox.exe 3908 Console 0 1,269,432 K
tasklist|find /i "firefox"
[usually no output]
Now, I just wanted to follow up with the observation that if you run
this repeatedly you get output that is truncated in a different way each
tasklist|find /v "xxxx"
This gives a little insight into the bug. WMIC can also give a task list
but I haven't tested it much.
IME, both TASKLIST and FIND are stable enough to produce consistent result.
And there doesn't seem to be any Windows registry setting related to pipe
functionality.

Which Windows version is that?

My only guess is interference from third party anti virus (AV) application
or other system utility tool which may affect processes other than
themselves, cause there are reports that buggy AVs interfered remote based
pipe operation or other things.
Tom Del Rosso
2022-01-10 03:11:44 UTC
Permalink
Post by JJ
IME, both TASKLIST and FIND are stable enough to produce consistent
result. And there doesn't seem to be any Windows registry setting
related to pipe functionality.
Which Windows version is that?
You're quite right. I was working on my scripts for doing background
things on an XP notebook. Windows 7 and 10 both look ok.

When I remote into different machines I forget to think about what
version they have. Of course I'm using it now because this is the old OE
reader. I have other news readers on the other machines but never
settled on one.
--
Defund the Thought Police
Loading...