[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 524
  • Last Modified:

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?
0
eAi2k
Asked:
eAi2k
  • 2
  • 2
1 Solution
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
What are the clients?  XP?  2000?  NT4?  98/Me?
0
 
eAi2kAuthor Commented:
Clients are all running XP
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Not sure why it's not working then - other than perhaps it's because it's a tool designed for 2000 - and while XP is VERY similar under the hood, so-to-speak, it's not the same.

Any reason you're not using "tasklist" instead of "pulist"?
0
 
brianadkinsCommented:


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
0
 
eAi2kAuthor Commented:
Used tasklist instead of pulist and it worked fine. Thanks!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now