writes language to registry for uninstaller
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1170 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
063eade67b
commit
165564227d
1 changed files with 21 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
;NSIS Modern Style UI version 1.20
|
;NSIS Modern Style UI version 1.20b
|
||||||
;Multilanguage & LangDLL Example Script
|
;Multilanguage & LangDLL Example Script
|
||||||
;Written by Joost Verburg
|
;Written by Joost Verburg
|
||||||
|
|
||||||
|
@ -91,6 +91,9 @@ Function .onInit
|
||||||
StrCmp $LANGUAGE "cancel" 0 +2
|
StrCmp $LANGUAGE "cancel" 0 +2
|
||||||
Abort
|
Abort
|
||||||
|
|
||||||
|
;Write the language to the registry (for the uninstaller)
|
||||||
|
WriteRegStr HKCU "Software\${NAME}" "Installer Language" "$LANGUAGE"
|
||||||
|
|
||||||
StrCmp $LANGUAGE 1043 "" +2
|
StrCmp $LANGUAGE 1043 "" +2
|
||||||
SectionSetText ${SecCreateUninst} "Deïnstallatie programma"
|
SectionSetText ${SecCreateUninst} "Deïnstallatie programma"
|
||||||
|
|
||||||
|
@ -200,6 +203,10 @@ Section "Uninstall"
|
||||||
|
|
||||||
RMDir "$INSTDIR"
|
RMDir "$INSTDIR"
|
||||||
|
|
||||||
|
;Security - do not delete anything if ${NAME} is empty
|
||||||
|
StrCmp "${NAME}" "" +2
|
||||||
|
DeleteRegKey HKCU "Software\${NAME}"
|
||||||
|
|
||||||
!insertmacro MUI_FINISHHEADER un.SetPage
|
!insertmacro MUI_FINISHHEADER un.SetPage
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
@ -207,6 +214,19 @@ SectionEnd
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Uninstaller Functions
|
;Uninstaller Functions
|
||||||
|
|
||||||
|
Function un.onInit
|
||||||
|
|
||||||
|
Push ${TEMP1}
|
||||||
|
|
||||||
|
;Get the language from the registry (save by uninstaller)
|
||||||
|
ReadRegStr ${TEMP1} HKCU "Software\${NAME}" "Installer Language"
|
||||||
|
StrCmp ${TEMP1} "" +2
|
||||||
|
StrCpy $LANGUAGE ${TEMP1}
|
||||||
|
|
||||||
|
Pop ${TEMP1}
|
||||||
|
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
Function un.onNextPage
|
Function un.onNextPage
|
||||||
|
|
||||||
!insertmacro MUI_NEXTPAGE un.SetPage
|
!insertmacro MUI_NEXTPAGE un.SetPage
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue