eAi2k
asked on
PULIST failing to output correctly
We're running PULIST here as part of a batch file (PULIST comes from MS in the resource toolkit). On some machines, the PULIST fails to be outputted to a file or as a pipe, while on others it works fine.
For example:
@ECHO OFF
pulist | findstr /I /C:test.exe && ECHO FOUND & GOTO endit
ECHO NOT FOUND
:endit
Works on some machines fails on others (even when test.exe is outputted from pulist normally).
Similarily,
pulist > test.txt
Fails on some computers, it just creates a blank test.txt file (overwriting what is in there), but contains nothing... Any ideas?
For example:
@ECHO OFF
pulist | findstr /I /C:test.exe && ECHO FOUND & GOTO endit
ECHO NOT FOUND
:endit
Works on some machines fails on others (even when test.exe is outputted from pulist normally).
Similarily,
pulist > test.txt
Fails on some computers, it just creates a blank test.txt file (overwriting what is in there), but contains nothing... Any ideas?
What are the clients? XP? 2000? NT4? 98/Me?
ASKER
Clients are all running XP
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In this case, I don't think the /C: option is required (no spaces in your criteria).
I'd tru it like this to see if you get better results:
pulist | findstr /I "test.exe" && ECHO FOUND & GOTO endit
ASKER
Used tasklist instead of pulist and it worked fine. Thanks!