http://dallascao.com/en/end-a-process-with-inno-setup/
So easy.
These two functions will ctry to close the process gt4t.exe at installation and uninstallation.
Notice tskill.exe is for Windows XP and taskkill.exe is for Windows 7.
[Code]
function InitializeSetup(): Boolean;
var
ErrorCode: Integer;
begin
ShellExec('open',
'taskkill.exe',
'/f /im gt4t.exe','',SW_HIDE,ewNoWait,ErrorCode);
ShellExec('open',
'tskill.exe',
' gt4t','',SW_HIDE,ewNoWait,ErrorCode);
result := True;
end;
function InitializeUninstall(): Boolean;
var
ErrorCode: Integer;
begin
ShellExec('open',
'taskkill.exe',
'/f /im gt4t.exe','',SW_HIDE,ewNoWait,ErrorCode);
ShellExec('open',
'tskill.exe',
' gt4t','',SW_HIDE,ewNoWait,ErrorCode);
result := True;
end;