Archive: Hiding Section in Uninstall


Hiding Section in Uninstall
Hello

I'm not 100% familiar with NSIS.

My FAQ is: How I can hide a section in uninstall?

I must install a new version of a product, but the uninstaller must delete all previously products - even if those aren't in this version of install.

I manage to fade those checkBoxes that aren't needed...but haw can I hide the sections??? to not appear at all?

Later Edit: Name of valid sections are present in registry.


function un.resetSectionSelected
;default selection - selectable and selected
SectionGetFlags $0 $r0
intop $r0 $r0 | 1
SectionSetFlags $0 $r0
functionend

function un.setSectionSelected
;if not installed cannot uninstall -> not selectable and not selected
SectionGetFlags $0 $r0
intop $r0 $r0 & 254
intop $r0 $r0 | 16
SectionSetFlags $0 $r0
functionend


10x

Hi
hi HandShake,

Try using - sign before the section name. That should work.

like as shown below

Section "un.-resetSectionSelected"
....... CODE IN BETWEEN...............
SectionEnd

OR

Section "un.-setSectionSelected"
....... CODE IN BETWEEN...............
SectionEnd

Regards,
NBaua


Re: Hi


Section "-un.resetSectionSelected"
...
But this "-..." disable the Section at all. My question is: how I hide dynamically a section, function of a "If var" or a REG KEY in my case.

Depending of the PC of every user, different products were installed, so only part of sections/checkBoxes must appear in install/uninstall.

A way to do this is to construct my own "form" and put in there different buttons, texts and checkBoxes, but is not the way I want to do it.

10x.

You can use the SectionSetText for that. Simply set the section's text to nothing ("") and it won't show in the components page.