You can use nsProcess plugin
For Chrome
Function CloseRestoreChrome
${nsProcess::FindProcess} "chrome.exe" $IsRestoreChrome
StrCmp $IsRestoreChrome 0 0 +3
logex::Write "$dt Chrome running."
${nsProcess::KillProcess} "chrome.exe" $R0
;Dow your work here
${If} $IsRestoreChrome == 0
StrCpy $path "$LocalAppData\Google\Chrome\Application\chrome.exe --restore-last-session"
exec $path
logex::Write "$dt Chrome restored"
${EndIf}
FunctionEnd
Similarly you can Find and Kill process of Firefox and IE.