Reference/.onVerifyInstDir

From NSIS Wiki
Revision as of 15:42, 27 November 2011 by Jan (talk | contribs) (Created page with "=.onVerifyInstDir= This callback enables control over whether or not an installation path is valid for your installer. This code will be called every time the user changes the i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

.onVerifyInstDir

This callback enables control over whether or not an installation path is valid for your installer. This code will be called every time the user changes the install directory, so it shouldn't do anything crazy with MessageBox or the likes. If this function calls Abort, the installation path in $INSTDIR is deemed invalid.

Example:

  Function .onVerifyInstDir
    IfFileExists $INSTDIR\Winamp.exe PathGood
      Abort ; if $INSTDIR is not a winamp directory, don't let us install there
    PathGood:
  FunctionEnd