Skip to content
⌘ NSIS Forum Archive

Install Directory Background Color and Logic.

3 posts

Dygear#

Install Directory Background Color and Logic.

Function .onVerifyInstDir
    IfFileExists $INSTDIR\file.ext PathGood PathBad
    PathGood:
        ; I'd like to change the background of the Install Directory Text Box to Green.
    PathBad:
        ; I'd like to change the background of the Install Directory Text Box to Red.
FunctionEnd 
So, I've got the logic, now I need to know how to change the background color of the install directory text box and the border color, if you could also change the font color for just that one text box, that would be good too.

Thankie 🙂.
Afrow UK#

!include LogicLib.nsh

Function .onVerifyInstDir
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R0 $R0 1019
${If} ${FileExists} "$INSTDIR\file.ext"
SetCtlColors $R0 000000 00FF00
${Else}
SetCtlColors $R0 000000 FF0000
${EndIf}
FunctionEnd
Using LogicLib instead.

-Stu