Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

tasklist giving ERROR: Not found

Posted on 2015-01-26
4
Medium Priority
?
643 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
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…

876 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