Find Task list entries with VBS

J

Jake104E

I want to detect if a given program (App) is running.


I have made the following VB-Script to list all "programs" running:


Sub ListPGMs
Dim WMIService
Dim ProcessList
dim objSWbemObject
Set WMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set ProcessList = WMIService.ExecQuery ("SELECT * FROM Win32_Service")
For Each objSWbemObject In ProcessList
call Append_to_LogFile("Name: " & objSWbemObject.Name, "PGMlist.txt")
Next
end sub


Append_to_LogFile is just a utility that writes to a txt-file.


I get a lot of names in this file - like all the background and windows processes - but I can't identify the Apps that I have running.


How do I do that?

Continue reading...
 

Similar threads

T
Replies
0
Views
70
The Scathing Brit
T
R
Replies
0
Views
157
Rajdeep218
R
J
  • Article
Replies
0
Views
250
John Cable, Vice President, Program Management
J
Back
Top Bottom