Solved

tasklist giving ERROR: Not found

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
outlook and exchange information 3 34
How to install windows?? 2 43
paging file usage  > 95% for 30 min about 12 33
Domain Controller Time Sync Question 4 23
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you sā€¦
How to record audio from input sources to your PC ā€“ connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 ā€“ both 32 bit & 64.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to ā€¦

803 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