Old 7th March 2006, 13:34   #1
gabirata
Junior Member
 
Join Date: Mar 2006
Posts: 3
What's Wrong?

Function .onInit
IfFileExists "$INSTDIR\conf.dat" exit
exit:
MessageBox MB_ICONINFORMATION|MB_OK "A previous version is installed"
Abort
FunctionEnd
gabirata is offline   Reply With Quote
Old 7th March 2006, 13:44   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You must jump somewhere else if the file doesn't exist. Use the LogicLib for simpler code:
code:
!include LogicLib.nsh

Function .onInit
${If} ${FileExists} $INSTDIR\conf.dat
MessageBox MB_OK "exists..."
Abort
${EndIf}
FunctionEnd

And for future posts, please at least include what exactly doesn't work as it should for you, instead of letting people guess.

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
Reply
Go Back   Winamp & Shoutcast 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