Smile2Me
7th May 2002 06:56 UTC
Bug in IfFileExists?
I'm creating hyperlinks with NSIS to dirs if the dir exists. Testing the code I found this:
IfFileExists "C:\*.*" returned "EXISTS" in Win2K and "DOES NOT EXIST" in Win98 (and it actually exists :)).
For other dirs (eg: "C:\Program Files\*.*") everything seems to work fine.
I guess this is a bug :(
Greetz,
-Hendri.
kichik
7th May 2002 16:26 UTC
If you want to find any file why not use FindFirst?
Smile2Me
8th May 2002 08:25 UTC
KiCHiK,
I only want to know if the directory exists. If it does not exist, then the utility will not create a hyperlink to that dir. Otherwise it will. So I need to use IfFileExists.
Thx for your response though :)
Greetz,
-Hendri.
kichik
8th May 2002 09:05 UTC
Well, IfFileExists uses FindFirstFile anyway... :)
I have also tried some combinations my self on Win98, nothing seems to work... Must be yet another Microsoft unreferenced feature :D ...
Smile2Me
8th May 2002 09:17 UTC
Hmmm...
doesn't sound hopefull :(.
Is there a way to overcome this problem with current NSIS?
-Hendri.
kichik
8th May 2002 10:44 UTC
Try searching MSDN, maybe you will find something useful over there...
kichik
8th May 2002 11:50 UTC
GetFullPathName $1 "Q:\*.*"
Seems to work prefectly fine on both XP and Win98. It returns an empty string if not found.
Smile2Me
8th May 2002 12:51 UTC
Of course, I didn't think of this because I was fixed on IfFileExists too much...
Thx,
-Hendri.