Vanessa19
19th July 2006 13:38 UTC
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
Yurik
19th July 2006 14:00 UTC
Create a custom page with a FileRequest control.
Vanessa19
19th July 2006 14:23 UTC
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?
Yurik
19th July 2006 14:27 UTC
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)
Vanessa19
19th July 2006 17:25 UTC
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.
Joel
19th July 2006 19:22 UTC
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!
Vanessa19
19th July 2006 21:51 UTC
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 ;)