Archive: Problem with SearchPath


Problem with SearchPath
I found SearchPath tries to locate the specific file in $WINDIR and $SYSDIR firstly, and then search it in %PATH%. However, such an order is different from the real mechanism of Windows of searching executable files.

There is a real case. ImageMagick is a widely used free image processing system. It has an executable file named convert.exe, which is identical with a WinNT/2000/XP's utility converting FAT32 to NTFS (and NTFS to FAT32). I want to check whether ImageMagick's convert.exe exists in PATH, but I always fail since NSIS' SearchPath function always returns "$SYSDIR\convert.exe", though ImageMagick's folder is actually occurs before $SYSDIR in %PATH%.

Should this problem be fixed or solved in another way?


You'd have to use a function to find it.

This is the simplest function on the archive:
http://nsis.sourceforge.net/archive/...ances=0,11,211
More advanced one:
http://nsis.sourceforge.net/archive/...ances=0,11,211

-Stu


Thanks, Afrow. Finally I have to turn to search another file of detect ImageMagick. Anyway, it seems a problem.