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:
joostverburg 2002-09-24 20:05:19 +00:00
parent 063eade67b
commit 165564227d

View file

@ -1,4 +1,4 @@
;NSIS Modern Style UI version 1.20
;NSIS Modern Style UI version 1.20b
;Multilanguage & LangDLL Example Script
;Written by Joost Verburg
@ -91,6 +91,9 @@ Function .onInit
StrCmp $LANGUAGE "cancel" 0 +2
Abort
;Write the language to the registry (for the uninstaller)
WriteRegStr HKCU "Software\${NAME}" "Installer Language" "$LANGUAGE"
StrCmp $LANGUAGE 1043 "" +2
SectionSetText ${SecCreateUninst} "Deïnstallatie programma"
@ -200,6 +203,10 @@ Section "Uninstall"
RMDir "$INSTDIR"
;Security - do not delete anything if ${NAME} is empty
StrCmp "${NAME}" "" +2
DeleteRegKey HKCU "Software\${NAME}"
!insertmacro MUI_FINISHHEADER un.SetPage
SectionEnd
@ -207,6 +214,19 @@ SectionEnd
;--------------------------------
;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
!insertmacro MUI_NEXTPAGE un.SetPage