Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 7th May 2002, 05:56   #1
Smile2Me
Guest
 
Posts: n/a
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.
  Reply With Quote
Old 7th May 2002, 15:26   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
If you want to find any file why not use FindFirst?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th May 2002, 07:25   #3
Smile2Me
Guest
 
Posts: n/a
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.
  Reply With Quote
Old 8th May 2002, 08:05   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
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 ...

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th May 2002, 08:17   #5
Smile2Me
Guest
 
Posts: n/a
Hmmm...

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

-Hendri.
  Reply With Quote
Old 8th May 2002, 09:44   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
Try searching MSDN, maybe you will find something useful over there...

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th May 2002, 10:50   #7
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
GetFullPathName $1 "Q:\*.*"
Seems to work prefectly fine on both XP and Win98. It returns an empty string if not found.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th May 2002, 11:51   #8
Smile2Me
Guest
 
Posts: n/a
Of course, I didn't think of this because I was fixed on IfFileExists too much...

Thx,
-Hendri.
  Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump