Skip to content
⌘ NSIS Forum Archive

ask to install message box?

5 posts

pure-krypton#

ask to install message box?

how would i create a message box that when the destination folder is not a winamp folder it asks me something like "The destination folder is not a winamp folder. Do you want to continue?"
deguix#
Command MessageBox:

MessageBox MB_YESNO "The destination folder is not a Winamp folder. Do you want to continue?" 
pure-krypton#
i know that much, but i want it to tell me that when winamp.exe is not in the destination folder
Bennyyy#
hi

sorry for my bad english...
use this

Function .onVerifyInstDir
IfFileExists $INSTDIR\Winamp.exe PathGood
Abort ;
PathGood:
FunctionEnd

the user can only install your software if the correct path is selected
deguix#
You can mix both of them to create what you're looking for:

Function .onVerifyInstDir
  IfFileExists "$INSTDIR\\Winamp.exe" PathGood
    MessageBox MB_YESNO "The destination folder is not a Winamp folder. Do you want to continue?" IDYES PathGood
    Abort
  PathGood:
FunctionEnd