NSIS: Base icon choices on previous install

Closes #7109
This commit is contained in:
bitraid 2022-04-13 12:54:26 +03:00
parent a97ffe0bd0
commit 6bf7907c19
No known key found for this signature in database
GPG Key ID: 21A3B0D950B23728
1 changed files with 10 additions and 2 deletions

View File

@ -542,8 +542,16 @@ Function PageInstallModeChangeMode
FunctionEnd
Function PageComponentsPre
GetDlgItem $0 $HWNDPARENT 1
SendMessage $0 ${BCM_SETSHIELD} 0 0 ; hide SHIELD (Windows Vista and above)
SendMessage $mui.Button.Next ${BCM_SETSHIELD} 0 0
StrCmpS $HasCurrentModeInstallation 0 +9
IfFileExists "$DESKTOP\${PRODUCT_NAME}.lnk" +4
SectionGetFlags ${SectionDesktopIcon} $1
IntOp $1 $1 & 0xFFFFFFFE
SectionSetFlags ${SectionDesktopIcon} $1
IfFileExists "$STARTMENU\${PRODUCT_NAME}.lnk" +4
SectionGetFlags ${SectionStartMenuIcon} $1
IntOp $1 $1 & 0xFFFFFFFE
SectionSetFlags ${SectionStartMenuIcon} $1
FunctionEnd
Function PageDirectoryPre