Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.
Function IsProcessRunning( strServer, strProcess ) Dim Process, strObject IsProcessRunning = False strObject = "winmgmts://" & strServer For Each Process in GetObject( strObject ).InstancesOf( "win32_process" ) If UCase( Process.name ) = UCase( strProcess ) Then IsProcessRunning = True Exit Function End If Next End Function On Error Resume Next Dim strComputer, strProcess strProcess = "outlook.exe" strComputer = "." If( IsProcessRunning( strComputer, strProcess ) = True ) Then Set Outlook = GetObject(, "Outlook.Application") If Err = 0 Then Outlook.Quit() End If Else WScript.Echo "Process " & strProcess & " is NOT running on computer " & strComputer End If
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
14 Experts available now in Live!