Only tested on windows 7
local exe_name = acGetExecutableName(acGetOwnerWindowByPoint(gsx, gsy),0,0)
-- get all windows and search for exe_name
acGetAllWindows(1)
for num, handle in pairs(sp_all_windows) do
-- close all application for exe_name
local exe = acGetExecutableName(handle,0,0)
if exe == exe_name then
acCloseApplication(handle, nil, nil)
end
end