"Install" button disabled after verifying directory
I am an NSIS newbie and am stuck. All help appreciated. My NSI file has just a few additions to an example that came with the NSIS distribution, but the "Install" button is now greyed out after I select the target directory.
The entire code of the NSI file is appended below-- quite short. I want the user to select the drive which happens to be assigned to the iPod, I want to verify that this drive is the right one, and I want to set the $INSTDIR (or $OUTDIR) to the "\Notes" folder on that drive. Is there something elementary I am screwing up? I have indeed read the manual and searched this forum, but to no avail. Thanks for any help. BTW, if I hard code the path (e.g.
SetOutPath "F:\Notes\"
it works just fine.
Alan Zaitchik
+========================================+
; The name of the installer
Name "az1"
; The file to write
OutFile "az1.exe"
; Select and verify installation directory
DirText 'Be sure that your iPod is connected to your computer and appears as an external drive.' 'If you are not sure which drive is your iPod,\r\ncheck to see which drive has the file "._iPod_Control" and a "Notes" folder on it.' 'Browse' 'Select the drive letter for your iPod. The installation will not continue unless a valid drive is selected.'
InstallDir ""
InstallButtonText "Continue"
Var /GLOBAL ipod_drive
Var /GLOBAL notes_dir
Function .onVerifyInstDir
IfFileExists $INSTDIR\._iPod_Control PathGood
Abort
PathGood:
StrCpy $ipod_drive $INSTDIR
StrCpy $notes_dir "\Notes\"
StrCpy $INSTDIR $ipod_drive$notes_dir
FunctionEnd
;--------------------------------
; Pages
Page directory
Page instfiles
;--------------------------------
; The stuff to install
Section "" ;No components page, name is not important
SetOutPath $INSTDIR
File az1.nsi ;for testing
SectionEnd ; end the section