NSIS:将文本 "Execute:*******" 更改为自定义文本
NSIS: Change the text "Execute:*******" to custom text
我是 NSIS 的新手,我创建了一个脚本来以链式方式安装我的所有程序。该脚本运行良好,但我想更改突出显示框中的文本以显示正在安装的程序的名称。例如,如果安装程序正在安装 Acrobat Reader,它应该显示 "Installing: Adobe Acrobat Reader".
截图如下:
; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Deployment"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "NoNe"
; MUI 1.67 compatible ------
!include "MUI.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
; Welcome page
;!insertmacro MUI_PAGE_WELCOME
; License page
;!insertmacro MUI_PAGE_LICENSE "..\..\..\path\to\licence\YourSoftwareLicence.txt"
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
;!insertmacro MUI_PAGE_FINISH
; Language files
!insertmacro MUI_LANGUAGE "English"
; MUI end ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Deploy.exe"
InstallDir "$TEMP"
ShowInstDetails show
Section -SETTINGS
SetOutPath "$TEMP"
SetOverwrite on
SectionEnd
Section "Adobe Acrobat Reader XI" SEC01
;Should display "Installing: Acrobat Reader" when installing this section
File "E:\Applications\AdbeRdr11002_en_US.exe"
ExecWait "$TEMP\AdbeRdr11002_en_US.exe /msi EULA_ACCEPT=YES /qn"
SectionEnd
Section "Mozilla Firefox" SEC02
;Should display "Installing: Mozilla Firefox" when installing this section
File "E:\Applications\Firefox4901.exe"
ExecWait "$TEMP\Firefox.exe -ms"
SectionEnd
有办法吗?
提前致谢...:)
可以使用指令DetailPrint "Installing: Adobe Acrobat Reader"
将字符串 "Installing: Adobe Acrobat Reader" 添加到安装程序的详细信息视图。
但下一个命令(在您的脚本中)将覆盖此文本(例如 "Extracting file ..."),因此您可以使用 SetDetailsPrint none|listonly|textonly| both|lastused 命令设置应用输出的位置:
SetDetailsPrint both
DetailPrint "Installing: Adobe Acrobat Reader"
SetDetailsPrint listonly
... Extract all your files here while "Installing: Adobe Acrobat Reader" is displayed ...
SetDetailsPrint both
我是 NSIS 的新手,我创建了一个脚本来以链式方式安装我的所有程序。该脚本运行良好,但我想更改突出显示框中的文本以显示正在安装的程序的名称。例如,如果安装程序正在安装 Acrobat Reader,它应该显示 "Installing: Adobe Acrobat Reader".
截图如下:
; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Deployment"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "NoNe"
; MUI 1.67 compatible ------
!include "MUI.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
; Welcome page
;!insertmacro MUI_PAGE_WELCOME
; License page
;!insertmacro MUI_PAGE_LICENSE "..\..\..\path\to\licence\YourSoftwareLicence.txt"
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
;!insertmacro MUI_PAGE_FINISH
; Language files
!insertmacro MUI_LANGUAGE "English"
; MUI end ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Deploy.exe"
InstallDir "$TEMP"
ShowInstDetails show
Section -SETTINGS
SetOutPath "$TEMP"
SetOverwrite on
SectionEnd
Section "Adobe Acrobat Reader XI" SEC01
;Should display "Installing: Acrobat Reader" when installing this section
File "E:\Applications\AdbeRdr11002_en_US.exe"
ExecWait "$TEMP\AdbeRdr11002_en_US.exe /msi EULA_ACCEPT=YES /qn"
SectionEnd
Section "Mozilla Firefox" SEC02
;Should display "Installing: Mozilla Firefox" when installing this section
File "E:\Applications\Firefox4901.exe"
ExecWait "$TEMP\Firefox.exe -ms"
SectionEnd
有办法吗?
提前致谢...:)
可以使用指令DetailPrint "Installing: Adobe Acrobat Reader"
将字符串 "Installing: Adobe Acrobat Reader" 添加到安装程序的详细信息视图。
但下一个命令(在您的脚本中)将覆盖此文本(例如 "Extracting file ..."),因此您可以使用 SetDetailsPrint none|listonly|textonly| both|lastused 命令设置应用输出的位置:
SetDetailsPrint both
DetailPrint "Installing: Adobe Acrobat Reader"
SetDetailsPrint listonly
... Extract all your files here while "Installing: Adobe Acrobat Reader" is displayed ...
SetDetailsPrint both