QTP/UFT support tip: How to close a processes from QTP/UFT
If you need to close some processes on your machine or you need to be sure that some processes don't have to be running when test is going to be executed then you can use the SystemUtil method to close them.
SystemUtil provides you different options to close a process: by name, by window title, by handle, by id.
systemutil.CloseProcessByWndTitle "Untitled - Notepad"
Also CloseProcessByWndTitle allows you to use regular expression so for example if you want to close all processes which window title start with Application (Application - main, Application - Sub, Application - Logs, etc.)
You can use regular expression to close all of them
SystemUtil .CloseProcessByWndTitle "Application.*",True
The second parameter indicates that the string is a regular expression.
If you find that this or any post resolves your issue, mark it as an accepted solution.
Note: The Opinions expressed in my post are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any answered posted.