[英]NSIS how to set a variable in messageBox on unistall section
i have a file when in this file there are differents LangString in differents languages. 我有一个文件,当此文件中有不同语言的不同LangString。 In another file, in the unistall section, i want call into the messagebox, depending on the language, the correct LangString that is in the Langstring file.
在另一个文件中,在unistall部分中,我想根据语言来调用到消息框中,即Langstring文件中的正确LangString。
In the install section it works fine 在安装部分,它可以正常工作
Section "Uninstall"
MessageBox MB_YESNO|MB_ICONQUESTION "$(UnSAVE_PROFILE)" IDYES borrar_perfil IDNO no_borrar_perfil
borrar_perfil:
DeleteRegKey HKCU "Software\XXX"
RMDir /r "$APPDATA\mulehome\"
RMDir /r "$APPDATA\..\Local\XXX\"
no_borrar_perfil:
Delete "$INSTDIR\XXX"
LangString file: LangString文件:
LangString UnSAVE_PROFILE ${LANG_PORTUGUESE} "Do you want delete the configuration files?"
LangString UnSAVE_PROFILE ${LANG_SPANISH} "Quieres eliminar también los ficheros de configuración?"
Any idea? 任何想法? Thx!!
谢谢!!
If you propose a language selection in the installer with (in the .onInit
function) 如果您建议使用(
.onInit
函数中的)安装程序中的语言选择
!insertmacro MUI_LANGDLL_DISPLAY
you can get back that setting in the uninstaller (in the un.onInit
function) 您可以在卸载程序中获取该设置(在
un.onInit
函数中)
!insertmacro MUI_UNGETLANGUAGE
The language setting should be preserved by the installer in the registry, in my setups I precise the location for the persistence: 语言设置应由安装程序保留在注册表中,在我的设置中,我确定了持久性的位置:
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\${Company}\${AppRegName}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
Also, don't forget to define separate LangStrings for the unsinstaller (as that application use different string tables) with un.
另外,不要忘了为卸载程序(使用该应用程序使用不同的字符串表)定义单独的LangString
un.
prefix. 字首。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.