Archive: newbie: how to ask for multiple install dirs?


newbie: how to ask for multiple install dirs?
Hi

I dont seem to find a way of asking the user several times to give a directory.
I am writing an installer which installs plugins for several applications at once, and i want the user to be able to specify each location separatly, but i only see 1 installdir call.

Is this a limitation of the installer or can i do it?

greetz

Joris


You can use InstallOptions that comes with NSIS to ask a user for another Install dir.. I currently use this for one of my installers cause it also installs plugins for other programs.. Take a look at the docs for InstallOptions in the Contrib dir to learn how to use it.. Really easy..


Or, you can create a different installer for a different set of plugins. Like:

Name MyApp
OutFile MyApp-inst.exe
;normal installation stuff here
Section "MyApp main program"
;File crap
SectionEnd
Section "Mozilla Plugs"
File mozplug-myapp.exe
ExecWait "open" $INSTDIR\mozplug-myapp.exe
Delete mozplug-myapp.exe
SectionEnd
Section "Internet Explorer Plugs"
File ie-myapp.exe
ExecWait "open" $INSTDIR\ie-myapp.exe
Delete ie-myapp.exe
SectionEnd
Section "Opera Plugs"
File operaplugs-inst.exe
ExecWait "open" opera-inst.exe
Delete opera-inst.exe
SectionEnd


That way, the installation can many different install dirs. Also, remember to disable to need for a license because you have given them the ablity to it read before they installed your program.

-Duane