Skip to content
⌘ NSIS Forum Archive

Skip MUI_PAGE if condition is fulfilled

3 posts

reace#

Skip MUI_PAGE if condition is fulfilled

Hi,

I want to check if a folder still exists or not.


If the folder exists the installer should skip the
"!insertmacro MUI_PAGE_DIRECTORY"
page and continue with
"!insertmacro MUI_PAGE_INSTFILES"
installing the files to the folder, which still exists (becuause the installer contains updates files).


If the folder doesn't exist the setup should show the
"!insertmacro MUI_PAGE_DIRECTORY"
page to select a new folder for installation.


"IfFileExists" is not allowed outside functions or sections and all other attempts to skip the MUI_PAGE_DIRECTORY were in vain 🙁

I hope you can give me some tips.
Anders#
in the pre callback function for the page (read the MUI docs to find the define to use) call abort to skip the page, and to check for directory, use; IfFileExists "some\path\*.*"
reace#
Many thanks for the fast reply and the tip!

I found the information and solved the problem.

Nice community!