List all Running Apps w2k 
Author Message
 List all Running Apps w2k

Can someone point me to a proceedure to list all running apps in
Windows 2000 and kill a selected one?

Thanks,

Roy



Mon, 14 Jul 2003 10:47:40 GMT  
 List all Running Apps w2k
If there's one in particular to kill, you don't need to list them all...

pgm = "notepad.exe"
set wmi = getobject("winmgmts:")
wql = "select * from win32_process " _
       & "where name='" & pgm & "'"
set processes = wmi.execquery(wql)
msgbox processes.count & " instance(s) of " & pgm
for each process in processes
  process.terminate
next

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> Can someone point me to a proceedure to list all running apps in
> Windows 2000 and kill a selected one?

> Thanks,

> Roy



Mon, 14 Jul 2003 12:08:13 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to get a list of running apps and How to close down apps

2. stop app, run script, restart app

3. get a list of running apps

4. Recommendations for listing running apps

5. Getting the list of running apps

6. List all running apps?

7. Obtain a list of currently running apps.

8. List all Running Apps w2

9. List of running Apps in taskbar

10. How to retrieve a list of all running apps

11. getting a list of visible running apps

12. Distinguish between XP home/prof, w2k SP level, w2K server/prof

 

 
Powered by phpBB® Forum Software