Old 18th February 2006, 23:12   #1
jonwil2
Junior Member
 
Join Date: Feb 2006
Posts: 2
how do I verify the install folder?

I have a NSIS installer which is using Modern UI.
I am using MUI_PAGE_DIRECTORY to do an installation directory dialog.
I wish to make it so that either the "next" button is greyed out unless the install folder contains <file> or when you press the next button, the installer wont move on unless the install folder contains <file>.
How can I do that?
jonwil2 is offline   Reply With Quote
Old 19th February 2006, 01:21   #2
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
Just use MUI_PAGE_CUSTOMFUNCTION_LEAVE to specify a leave function. In your leave function, you can then check for the presence of your file. Something like this:
code:

Function dirLeave
IfFileExists '$MyFile' leavedir
MessageBox MB_OK "File '$MyFile' does exist in this location."
abort
leavedir:
; OK to leave
FunctionEnd

Comperio 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