PSVince
From ISXKB
PSVince is a DLL to detect if a module is loaded in memory. It's based on this MSKB article
MSKB 175030 How To Enumerate Applications Using Win32 APIs
It is possible to download the DLL, a sample how to use it, and the source code psvince.zip 20KB
If you don't need to support Win9X or WinNT it is possible to use just code to detect if an exe is running How to detect if an application is running with code.
Essential code to use PSVince in Inno Setup.
[Files] Source: psvince.dll; Flags: dontcopy [Code] function IsModuleLoaded(modulename: String ): Boolean; external 'IsModuleLoaded@files:psvince.dll stdcall'; function InitializeSetup(): Boolean; begin Result := Not IsModuleLoaded( 'notepad.exe' ); end;
