Skip to content
⌘ NSIS Forum Archive

Bug in IfFileExists?

8 posts

Guest#

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.
Guest#
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#
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 😁 ...
Guest#
Hmmm...

doesn't sound hopefull 🙁.
Is there a way to overcome this problem with current NSIS?

-Hendri.
kichik#
GetFullPathName $1 "Q:\*.*"
Seems to work prefectly fine on both XP and Win98. It returns an empty string if not found.