Reference/.onVerifyInstDir: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
(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...") |
|||
| Line 10: | Line 10: | ||
PathGood: | PathGood: | ||
FunctionEnd</highlight-nsis> | FunctionEnd</highlight-nsis> | ||
Latest revision as of 18:46, 27 November 2011
.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