Controlling background processes using QTP
I want to check whether there is any process running in background. eg. i want to check if EXCEL.EXE is loaded in memory or not. Using rational this can be checked using 'Module Existance' checkpoint. Is there any way to do so in QTP? Also is there any way to kill the process(similar to End process of windows) ?
Re: Controlling background processes using QTP
strComputer = "."
Set objWMISvc = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set procList = objWMISvc.ExecQuery ("Select * from Win32_Process Where Name ="&Application)
if procList>0 then
msgbox "Process Exists/loaded in memory"
For Each objProcess in procList