Archive: guys, I need help on a directory-prompt question


guys, I need help on a directory-prompt question
im new to NSIS, I hope my idea is possible with this great script ;)

Section "test56" SEC01
MessageBox MB_YESNO|MB_ICONQUESTION|MB_SETFOREGROUND
"Should I create a backup?" IDYES true IDNO false
true:
RMDir "$INSTDIR\Backup"
CreateDirectory "$INSTDIR\Backup"
CopyFiles "$INSTDIR\*.*" "$INSTDIR\Backup\"
MessageBox MB_OK "Done!"
Goto next
false:
Goto next
next:
...


atm im using this script to create a backup of the former installation in $INSTDIR/Backup/. But I would like to prompt the installer for a directory after he choosed "YES" so the user can store it whereever he likes it. Is that possible and when...how?

Vanessa

Create a custom page with a FileRequest control.


sorry, from what ive know (the little ive found via search here) a FileRequest does prompt for a specific file or group of files? Could this also prompt just for a directory?


There is also DirRequest control should you need to request a directory. You can view all available controls under "InstallOptions 2" (NSIS/Contrib/InstallOptions/Readme.html)


thank you Yurik, I have read lots of texts and examples on ModernUI for about 3h now but feel more lost then ever ;)
Sadly the hint is right but it looks far too complex for me to build it myself and my poor english isnt a big help too in the docs.


But I would like to prompt the installer for a directory after he choosed "YES" so the user can store it whereever he likes it. Is that possible and when...how?
As an alternative, did you tested my plugins dialogs or dialogsEx? See my signature, comes with examples code.

Good luck!

just tried your DialogsEX for 5min and it does the job perfectly! Many, many thanks, saved me hours of trying to understand the InstallOptions-way ;)