#include<winapi.au3>
Dim $_Path="C:\Program Files\Internet Explorer\IEXPLORE.EXE"
$_Process=StringMid($_Path,StringInStr($_Path,"",0,-1)+1,StringLen($_Path))
$_List=ProcessList($_Process)
for $i=1 To $_List[0][0]
If _GetModuleFileNameEx($_List[$i][1])=$_Path Then ProcessClose($_List[$i][1])
Next
Func _GetModuleFileNameEx($pid)
$_Prhwnd = DllCall('Kernel32.dll', 'hwnd', 'OpenProcess', 'long', 0x10+0x400, 'int', 0, 'long',$pid)
If $_Prhwnd[0]=0 Then Return _WinAPI_GetLastError()
$_Return = DllCall('PSAPI.DLL', 'long', 'GetModuleFileNameEx', 'hwnd', $_Prhwnd[0], 'hwnd', 0, 'str', 0,"dword",255)
_WinAPI_CloseHandle($_Prhwnd[0])
Return $_Return[3]
EndFunc
|