?
Solved

tasklist giving ERROR: Not found

Posted on 2015-01-26
4
Medium Priority
?
530 Views
Last Modified: 2015-02-09
Running the DOS command "tasklist" returns "ERROR: Not found".

I am sure that it is working as tasklist /? gives all the usual help stuff.
0
Comment
Question by:TimGreeley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 6

Expert Comment

by:Leon Teale
ID: 40570681
is that the only program you cannot run? or does everything else seem to function ok.

perhaps try running the exe directly rather than from the file path. i.e.

%windir%\system32\tasklist.exe


does that work? also as administrator.

simple things i know, i just want to make sure the bases are covered and know where to go from there, i am in no way trying to insult your intelligence incase this is way below you.
0
 

Author Comment

by:TimGreeley
ID: 40588290
Hello Leon - thanks for your interest, and my intelligence is in no way insulted.

If I run "tasklist.exe" as you describe then I get:

C:\Users\sbull>c:\windows\system32\tasklist.exe
ERROR: Not found

Open in new window


(which should work)

If I run "tasklist.exe /?" then I get:

C:\Users\sbull>c:\windows\system32\tasklist.exe /?

TASKLIST [/S system [/U username [/P [password]]]]
         [/M [module] | /SVC | /V] [/FI filter] [/FO format] [/NH]

Description:
    This tool displays a list of currently running processes on

Open in new window


etc....

I get the same when running as Administrator.

A bit of background - I am using "tasklist" and then "taskkill" in a .NET program to kill of long running processes (FTP.EXE), to get the PID for the specified process and if it's still running 10 minutes (or anytime) later then kill it.  Perhaps you know a better solution?
0
 

Accepted Solution

by:
TimGreeley earned 0 total points
ID: 40588501
Don't worry I have found a good .NET solution.

        For Each p As Process In Process.GetProcesses()
            Debug.WriteLine(p.ProcessName + p.Id.ToString())
        Next

Open in new window


Thanks
0
 

Author Closing Comment

by:TimGreeley
ID: 40597928
It gave all the information I needed for running & killing processes.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question