Archive: silent install question


silent install question
hi!

this is my question:

i have an installer made with NSIS 1.98. it has 3 sections. is there a way to install (silent install) only 2 sections of 3 ?

PS: i saw that unistall component now supports sections. is there an example ?

thanks.


Silent installers only install selected sections, that is, sections with the SF_SELECTED flag. It works just like normal installers, only you can't show the components page so you have to unselect them yourself using macros from section.nsh or simple scripting.

Uninstall sections should start with the un. prefix, that's all you need to know. If you want a components page use UnisntPage components or PageEx un.components.


thanks kichik for the quick reply.

can you be more specific on the silent install question ?

for the uninstall part, you are right. that all i need to know.
but, why doesnt the unistall component take the sections from the install ? i mean if i have 3 section named "1" "2" "3", in the uninstall i should have the same sections. am i wrong ? or just did not understand what you were saying ? :rolleyes:


Use this in .onInit to unselect a section:

!include Sections.nsh
!insertmacro UnselectSection ${aSecIDontWantInSiletMode}

Use IfSilent to jump over this code if you want that section to be unselected only on silent installers.

Installer and uninstaller sections are completely seperate, their number doesn't have to be the same and they don't have to be related. The last "new stuff.zip" attachment in this thread contains an example with more than one uninstaller section.


Re: silent install question

Originally posted by o_owd i have an installer made with NSIS 1.98. it has 3 sections. is there a way to install (silent install) only 2 sections of 3 ?
Oops, got confused because of the uninstaller sections question, thought you are using the latest CVS version...

With 1.98 you'd have to do it the old fashioned way, which is checking if the user passed /S on the command line (use this), and if s/he did, skip the section by calling Return (all of this from within the section).

i'm confused too...

i do not have the script for the software i'm trying to install silent, it's something like "REDIST"...

i will look later at the script in the arhive. thanks again.


Oh... Then in that case, unless the installer writer has implemented his own command line processing, you can't.