Archive: Copy files on user PC depending on user input


Copy files on user PC depending on user input
Hi I want to create an installer that when a user starts it they are asked what configuration they want the installer to create and based on this selection by the user the installer will copy certain files on the users machine to certain places and then make some changes to .ini files based on the user inputing some variables.

i.e. - when the installer is started it asks - 'do you want to install option a or option b or option c etc (this can be radio buttons or tick boxes etc). Based on the selection made by the user the installer will copy a set of files (eg either the files for option a or the files for option b etc). Once the files are copied the user will then be asked to enter some variables that are written into the .ini files that were copied.

I hope someone can help and thank you.


Compile Contrib\InstallOptions\test.nsi for InstallOptions example.

-Stu


Thanks Afrow. Using that I can collect which option the user wants to install, but how do I then build that into an installer that then goes on to copy a certain set of files dependant on the state set by the user?

I will list which files need to be copied depedant on the option selected by the user (the user does not have to select).

I cannot see how to make that step? - i.e. from collection of state set by the user to copy a set of files dependant on that state?

Thanks again.


If you're doing that, why not use the standard NSIS Components page?

See Examples folder...

-Stu


I have managed to get the installer to allow the user to select from 2 subsets of files which is what I want. However, when I then use the custom page to collect the variables to write into the .ini files I end up with 2 functions called .OnInit. If I rename the functions they stop working.

Does anyone have any ideas please. Thanks. .nsi file attached.