即使在自定义屏幕以在 NSIS 中显示标题和描述后,完成页面有时也会显示重启选项
Finish page sometimes showing reboot option even after customized the the screen to show title and description in NSIS
我在 MyEnglish.nsh 文件中自定义了我的完成页面,如下所示。
LangString Finishpagetitle ${LANG_ENGLISH} "Completed the ${ApplicationName} Setup Wizard"
LangString Finishpagesubtitle ${LANG_ENGLISH} "Click the Finish button to exit the Setup Wizard"
并在我的 MainFile.ini 文件中写入以下代码,如下所示:
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_TEXT_FINISH_INFO_TITLE $(Finishpagetitle)
!define MUI_TEXT_FINISH_INFO_TEXT $(Finishpagesubtitle)
!define MUI_FINISHPAGE_RUN ""
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
通常我会看到带有上述自定义标题和文本的完成对话框。
但有时,我会得到不同的 Finish window,其中包含以下文本:
"Your computer must be restarted in order to complete the installation of $(^NameDA). Do you want to reboot now?"
有两个单选按钮 "Reboot now" 和 "I want to manually reboot later"
为什么显示重启对话框?
如果您在某些文件命令上使用 /RebootOK
开关,并且安装程序检测到文件已锁定,它将要求用户重新启动。
我在 MyEnglish.nsh 文件中自定义了我的完成页面,如下所示。
LangString Finishpagetitle ${LANG_ENGLISH} "Completed the ${ApplicationName} Setup Wizard"
LangString Finishpagesubtitle ${LANG_ENGLISH} "Click the Finish button to exit the Setup Wizard"
并在我的 MainFile.ini 文件中写入以下代码,如下所示:
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_TEXT_FINISH_INFO_TITLE $(Finishpagetitle)
!define MUI_TEXT_FINISH_INFO_TEXT $(Finishpagesubtitle)
!define MUI_FINISHPAGE_RUN ""
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
通常我会看到带有上述自定义标题和文本的完成对话框。
但有时,我会得到不同的 Finish window,其中包含以下文本:
"Your computer must be restarted in order to complete the installation of $(^NameDA). Do you want to reboot now?"
有两个单选按钮 "Reboot now" 和 "I want to manually reboot later"
为什么显示重启对话框?
如果您在某些文件命令上使用 /RebootOK
开关,并且安装程序检测到文件已锁定,它将要求用户重新启动。