Login   /   Register

Get all processing on the local machine

Rate this article
     0 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 5
Loading ... Loading ...
April 11th, 2008 by Yaron Assa

Get all running processing on the local machine:

Dim objWMIService, objProcess, colProcess
Dim strComputer, strList
 
strComputer = "."
 
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2″)
 
Set colProcess = objWMIService.ExecQuery _
("Select * from Win32_Process")
 
For Each objProcess in colProcess
    strList = strList & vbCrLf & _
    objProcess.Name
Next
 
Print strList

Posted in Scripting Techniques

3 Responses to “Get all processing on the local machine”

  1. nadav Says:

    [+]

    Why not use the Dotnetfactory with Process Class and use GetProcesses(). this will return Process[] and you can use all the pro... ...

  2. Yaron Assa Says:

    [+]

    You're absolutely right, it was going to be our next QTip. If you'd like, you can write it yourself, and we'll publish it under yo... ...

  3. MikePietsch Says:

    [+]

    Has anyone actually done this with DotNetfactory? I would like to do this but am having issue with: DotNetFactory.CreateIns... ...

Leave a Reply

You must be logged in to post a comment.

This article was viewed 476 times