Hi again,
thanks for the tips. I didn't use EnumProcessModules, but I got the
solution as shown below:
import win32api, win32con, win32process
def IsRunning(filename):
processes = win32process.EnumProcesses()# get PID list
for pid in processes:
try:
handle = win32
These functions in win32process should be able to get that for you:
OpenProcess, EnumProcessModules and GetModuleFileNameEx
The executable will be the first module returned from EnumProcessModules.
Roger
Gabriel Reis wrote:
Hi,
I want to get the executable filename and its path from a process