Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
closing a process using QTP
#2
Solved: 10 Years, 9 Months, 4 Weeks ago
I tried the same code but it is closing only process explorer...Try the below code.

Code:
'Get the WMI object
Set WMI = GetObject("winmgmts:\\")

'Get collection of processes for with name iexplore.exe
Set allIE = WMI.ExecQuery("Select * from Win32_Process Where Name = 'iexplore.exe'")

'Loop through each process and terminate it
For Each IE in allIE
    IE.Terminate()
Next
Reply


Messages In This Thread
closing a process using QTP - by sunny rao - 08-15-2008, 10:27 AM
RE: closing a process using QTP - by ashokghali - 08-22-2008, 04:56 PM
RE: closing a process using QTP - by Ankur - 08-22-2008, 09:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Control to spawned process DomG 1 1,040 07-03-2020, 07:21 PM
Last Post: Ankur
  Killing the windows process using QTP Script. nagaraj_kv 4 18,916 05-03-2012, 01:13 PM
Last Post: Ankesh
  QTP Business Process Testing vijaya2009 1 4,762 01-11-2012, 11:38 AM
Last Post: nileshpatil70
Smile Need Some Info - on Automation process Nageshearaiah 0 2,188 06-11-2011, 06:10 PM
Last Post: Nageshearaiah
  Killing the windows process using QTP Script. nagaraj_kv 0 2,494 06-07-2011, 12:13 PM
Last Post: nagaraj_kv

Forum Jump:


Users browsing this thread: 1 Guest(s)