1) You can read up about SystemUtil.CloseProcessByName in the QTP help files. An example of this would be - SystemUtil.CloseProcessByName("explorer.exe") ... This will close all open IE browsers. Basically any process that is currently active can be killed with this command. You can see the exact name of a process in windows Task Manager (when you hit ALT+CTRL+DEL).
2) Here's an example to close n browsers open on your terminal.
For i = 0 to n 'n should be number of open browsers
If Browser("creationtime:="&n).Exist(2) Then
You can use similar logic for your application windows. You would ofcourse have to find out the number of open windows/browsers at that instant.
[ 05-25-2005, 02:46 PM: Message edited by: Mark M ]
You could use the Close and Exist(<time variable> statement with the window names in a loop to do this or if you dont necessarily care about a clean exit and want to just kill the process, use SystemUtil.CloseProcessByName (<process name>. However I think this command is available only in some of the recnt versions of QTP. Check it out.