Hi All,
I cant seem to find the answer to this for VB.NET and hoping some one can help me. I am looking to look at all running processes on a system and take a look at the number of times say IEXPLORE.exe is running. In my .vbs script I had a function that looks like this:
This way I could keep 5 monitoring sessions open at all times. If one was to quit, my main body of the script would then spawn off another version of Monitor.exe
I can not seem to find a way to do this same thing in VB.NET. Any help would be greatly appreciated..
i case it is of any interest this is what I have for imports:
thanks again!
I cant seem to find the answer to this for VB.NET and hoping some one can help me. I am looking to look at all running processes on a system and take a look at the number of times say IEXPLORE.exe is running. In my .vbs script I had a function that looks like this:
VB.NET:
sub CheckCompletion
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = 'monitor.exe'")
do while colProcesses.Count > 5
Wscript.Sleep 60000
Set colProcesses = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = 'monitor.exe'")
Loop
End Sub
This way I could keep 5 monitoring sessions open at all times. If one was to quit, my main body of the script would then spawn off another version of Monitor.exe
I can not seem to find a way to do this same thing in VB.NET. Any help would be greatly appreciated..
i case it is of any interest this is what I have for imports:
VB.NET:
Imports System
Imports System.Environment
Imports System.Diagnostics
Imports System.Threading
Imports System.Data
Imports System.Data.OleDb
Imports System.Management