In the documentation, there is sample code to detect if a process is running. For this code, why is "strComputer" a variable? Am I suppose to set that to a value other than "."? See below. I changed the code for "OUTLOOK.EXE".
Dim objWMIService, objProcess, colProcess
Dim strComputer
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcess = objWMIService.ExecQuery ("Select * from Win32_Process")
Session.Property("PROCESS")="NOT RUNNING"
For Each objProcess in colProcess
if objProcess.Name = "OUTLOOK.EXE" then
Session.Property("PROCESS")="RUNNING"
End If
Next
FOLLOW US
Get the latest news in Application Packaging