Custom Search

Tuesday, May 10, 2011

Close QTP after execution from VBS Files

Private Function CloseQTP
        Set objWMIService = GetObject(“winmgmts:\\.\root\CIMV2″)
        Set colProcess = objWMIService.ExecQuery (“Select * from Win32_Process Where Name =  QTPro.exe’”)
       For Each objProcess in colProcess
          objProcess.Terminate()
      Next
     Set objWMIService = Nothing
    Set colProcess = Nothing
End FunctionCall CloseQTP

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.