Computer Hope
Microsoft => Microsoft DOS => Topic started by: -RIDDICK- on October 11, 2005, 02:07:55 AM
-
Sorry for my english, I want know if there is a command from prompt (on win-xp) that permit me to show the list of the program that are in esecution on my machine. Similary the Taskmanager on windows. Time late I know this command but now I don't remember and I need it.
Thank you for all.
Best regards.
-
Tasklist will work on XP Pro machines otherwise you can easily write your own.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process")
For Each objProcess in colProcessList
WScript.Echo objProcess.Name
Next
The script is pretty crude, no sort, and just the basic, no frills information. Save the script with a vbs extension and run it from the command line: cscript scriptname.vbs
Happy Computing 8)
-
Thank you, it work very well, but I need that the result it display on dos prompt, no in windows in Xp.
I connect with my machine on dos from internet and I need to know who are the program in esecution.
HELP ME!!!!!!!
-
The only command from DOS I remember that will do this is MEM with either the /P or /C switch. The results will be inaccurate as the only programs listed will be those running within the CMD or COMMAND shell.
CSCRIPT is designed for command line operation. Did not the script produce the results within the CMD window?
Let us know. 8)