Skip to content
⌘ NSIS Forum Archive

Sections in the script file

4 posts

ikoonman#

Sections in the script file

Hi

Sorry to post a question like this - but i've gone through the manual and examined pieces of scripts and I cannot for the life of me understand what the purpose of sections in scripts are. How are they different from functions?

If somebody can point me to a url explaining to me how they work that will be great (unless you have time to type something up!)
shouman#
Functions can contain script code, just like sections. The difference between sections and functions is the way they are called.....

Here is a nice guide,you can see this.

ikoonman#
Great - thanks.

But does sections only have to do with file installation options (user's choices) and actual code regarding copying and installing the files?
shouman#
You can define it as a component. Section corresponds to the component in the component page.

“The instructions that can be used in sections are very different from the installer attributes instructions, they are executed at runtime on the user's computer. Those instructions can extract files, read from and write to the registry, INI files or normal files, create directories, create shortcuts and a lot more.”