Hi Guys,
i wonder if you could help me out here, i have been creating a new script for NSIS and i am having a problem in a couple of areas, if you could help me out i would appreciate it, have already searched through the forums and google before asking to make sure it hadnt been covered.
Basically i want my UNINSTALLER component page to have the checkboxes either enabled or disabled depending on a registry value (i.e. is that software installed and if it is make the box have a tick in it and if its not remove the tick) - im currently using a single section group and 3 products within that group
here is the relevant code:
Function un.onInit
;READ REGISTRY STRINGS AND SET THE CHECKBOXES ACCORDING TO WHAT IS INSTALLED
ClearErrors
EnumRegKey $0 HKLM "Software\MySoftware\MyApp\Sections" "Product1"
IfErrors 0 keyexist1
!insertmacro UnselectSection ${unSec01}
SectionSetText ${unSec01} ""
keyexist1:
!insertmacro SelectSection ${unSec01}
SectionSetText ${unSec01} ""
the above doesnt seem to work as sometimes the checkboxes on the components page disappear completely!
anyone got any ideas?
thanks,
Dazza
Question about component page
5 posts
err, yeah, lets try moving this thread to the NSIS discussion area and out of the breaking news forum, you might get a response!
/ohhh, look, I don't think I've ever posted in here before, hai guyz!
/ohhh, look, I don't think I've ever posted in here before, hai guyz!
Setting no text on a section hides it from the components page. You need to use the SetSectionFlag macro in Sections.nsh and set ${SF_RO}.
Stu
Stu
yes that works however i didnt explain myself properly above, i want to add/remove the tick in the checkbox and not disable it
thanks for such a quick response too
thanks for such a quick response too
There are macros to select and unselect sections in Sections.nsh.
Stu
Stu