Skip to content
⌘ NSIS Forum Archive

how to ask user to select a disk drive

4 posts

pinemanhh#

how to ask user to select a disk drive

During my installation I want to show a dialog (or some UI control) to let the user select a disk drive as the installation destination. But this must be a disk drive ONLY and it can't be a directory. The user is presented with all logical disk drives (like D: E:...) but won't be able to drill down. After the user makes the selection, the script gets the selection and continues. Appreciate it if someone can give me some help to write it. Thanks!!
Afrow UK#
You can create an InstallOptions page.
There's a GetDrives function in FileFunc.nsh

-Stu
pinemanhh#
I am really new to NSIS and appreciate your help. I tried the test.nsi script under "Examples" directory and figured out how to show an InstallOptions page (of radiobuttons for instance).

I also tried GetDrives function to get the drives, but I couldn't figure out how to put them tegether because in the example, the contents of the InstallOptions are statically defined in a separate .ini file.

Can you point me to an example file or shed some light on this? Thanks!