NSIS: Don't install link to Desktop of a link by the same name already exists

Unfortunately, we cannot determine the target path for the .lnk file
without pulling in closed source plugins (or write our own), a length
I am not willing to go in the light of MSI.

Fixes #356
This commit is contained in:
Daniel Molkentin 2014-01-17 23:57:07 +01:00
Родитель 77610eb184
Коммит 2a0f28208c
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -633,6 +633,16 @@ Function .onInit
SectionSetInstTypes ${SEC_QUICK_LAUNCH} 0
${EndIf}
; Some people might have a shortcut called 'ownCloud' pointing elsewhere, see #356
; Unselect item and adjust text
${If} ${FileExists} "$DESKTOP\${APPLICATION_NAME}.lnk"
SectionSetText ${SEC_DESKTOP} $INIT_NO_DESKTOP
Push $0
SectionSetFlags ${SEC_DESKTOP} 0
SectionSetInstTypes ${SEC_DESKTOP} 0
Pop $0
${EndIf}
${MementoSectionRestore}
UAC_Elevate: