Solved

tasklist giving ERROR: Not found

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

The problems with reply email signatures

Do you wish that you could place an email signature under a reply? Well, unfortunately, you can't. That great Exchange/Office 365 signature you've created will just appear at the bottom of an email chain. What a pain! Is there really no way to solve this? Well, there might be...

Join & Write a Comment

For a variety of reasons, it sometimes makes sense to reboot a Windows-based computer on a regular, perhaps daily basis. This "cures" a lot of ills by resetting processes, flushing caches, refreshing memory, and reestablish network connections. In a…
Several part series to implement Internet Explorer 11 Enterprise Mode
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…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now