Solved

tasklist giving ERROR: Not found

Posted on 2015-01-26
4
466 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

Technology Partners: 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

Windows 10 Creator Update has just been released and I have it working very well on my laptop. Read below for issues, fixes and ideas.
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…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

717 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