【问题标题】:How to configure uninstaller's welcome page, INSTFILES page and unistaller finish page in NSIS?如何在 NSIS 中配置卸载程序的欢迎页面、INSTFILES 页面和卸载程序完成页面?
【发布时间】:2016-02-19 21:45:01
【问题描述】:

我想更改卸载程序欢迎页面上的默认文本,例如欢迎页面标题应为“欢迎使用我的卸载设置”,并且我希望标题下方的文本如“安装程序将引导您完成 MYAPP 的卸载。开始之前卸载,确保 MYAPP 没有运行。” 在 MUI_UNPAGE_INSTFILES 页面上,我希望标题为“Unistall MYAPP”,下面我想显示“从您的计算机中删除 MYAPP”。在完成页面上,我想显示“MYAPP 已从您的计算机上卸载。单击“完成”关闭设置!” 我正在像下面那样做-

!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH

但它向我显示了默认文本,例如“名称已从您的计算机中卸载”我想将其配置为在页面上显示我自己的文本。我该怎么做?

【问题讨论】:

  • 您是否尝试过阅读 MUI 文档?

标签: nsis


【解决方案1】:

您可以覆盖所有字符串,您只需在MUI documentation 中查找定义。

!include MUI2.nsh
!insertmacro MUI_PAGE_INSTFILES
!define MUI_WELCOMEPAGE_TITLE "Blah blah title"
!define MUI_WELCOMEPAGE_TEXT "Blah blah welcome page text"
!insertmacro MUI_UNPAGE_WELCOME
!define MUI_PAGE_HEADER_TEXT "Header blah"
!define MUI_PAGE_HEADER_SUBTEXT "Subheader blah"
!define MUI_UNCONFIRMPAGE_TEXT_TOP "Blah blah title"
!define MUI_UNCONFIRMPAGE_TEXT_LOCATION "Blah blah location"
!insertmacro MUI_UNPAGE_CONFIRM
!define MUI_PAGE_HEADER_TEXT "Uninstall MYAPP"
!define MUI_PAGE_HEADER_SUBTEXT "Remove MYAPP from your computer"
!define MUI_INSTFILESPAGE_FINISHHEADER_TEXT "Done blah"
!define MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT "blah blah"
!insertmacro MUI_UNPAGE_INSTFILES
!define MUI_FINISHPAGE_TITLE "Blah blah title"
!define MUI_FINISHPAGE_TEXT "MYAPP has been uninstalled from your computer.Click 'Finish' to close the setup!"
!insertmacro MUI_UNPAGE_FINISH
!insertmacro MUI_LANGUAGE English

Section 
SetOutPath "$Temp\MUITest"
WriteUninstaller "$Temp\MUITest\Uninst.exe"
ExecShell "" "$Temp\MUITest\Uninst.exe"
Quit
SectionEnd
Section Uninstall
SetAutoClose false ; Without this you never get to see MUI_INSTFILESPAGE_FINISHHEADER_TEXT
Sleep 3333
Delete "$InstDir\Uninst.exe"
RMDir "$InstDir"
SectionEnd

【讨论】:

    猜你喜欢
    • 2013-10-27
    • 1970-01-01
    • 2013-11-09
    • 2012-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-24
    • 1970-01-01
    相关资源
    最近更新 更多