GetModuleFileName retrieves module names for the current process only. You can use GetModuleFileNameEx for other processes. Pass 0 for the module handle to get the main executable. Roger