Skip to content

Commit

Permalink
change MessageBox if path already exist
Browse files Browse the repository at this point in the history
  • Loading branch information
huche6 committed Dec 12, 2023
1 parent fec1f98 commit fc4142e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions constructor/nsis/main.nsi.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -844,12 +844,17 @@ Pop $0
Function OnDirectoryLeave
${LogSet} on
${If} ${IsNonEmptyDirectory} "$InstDir"
DetailPrint "::error:: Directory '$INSTDIR' is not empty, please choose a different location."
MessageBox MB_OK|MB_ICONEXCLAMATION \
DetailPrint "::error:: Directory '$INSTDIR' is not empty."
MessageBox MB_YESNO \
"Directory '$INSTDIR' is not empty,$\n\
please choose a different location." \
/SD IDOK
Abort
do you want to upgrade the installation ?" \
/SD IDYES \
IDYES confirmed_yes IDNO confirmed_no
confirmed_no:
MessageBox MB_OK|MB_ICONSTOP "Choose another directory." /SD IDOK
Abort
confirmed_yes:
SetOverwrite "ifdiff"
${EndIf}

ReadRegStr $LongPathsEnabled HKLM "SYSTEM\CurrentControlSet\Control\FileSystem" "LongPathsEnabled"
Expand Down

0 comments on commit fc4142e

Please sign in to comment.