环境:
不需要Finish页面
这样释放文件的页面,步入的时候就会显示“关闭”,但程序自身在.onInstSuccess函数处又加了自动启动相关程序,这样“关闭”按钮的显示太生硬
问题:
需要修改释放文件的“关闭”按钮显示为“完成”
-----------------------------------------------------------------
尝试方法:
A:
使用
GetDlgItem $R0 $HWNDPARENT 1 SendMessage $R0 ${WM_SETTEXT} 0 `STR:小黑`
来更改按钮显示内容
把上面的方法定义出来,放到
; 安装过程页面
!insertmacro MUI_PAGE_INSTFILES
后,定义调用此方法
!define MUI_PAGE_CUSTOMFUNCTION_SHOW "CompShowProc" Function "CompShowProc" GetDlgItem $R0 $HWNDPARENT 1 SendMessage $R0 ${WM_SETTEXT} 0 `STR:小黑` ;下一步按键 GetDlgItem $R0 $HWNDPARENT 2 SendMessage $R0 ${WM_SETTEXT} 0 `STR:我叫小黑` ;取消按键 GetDlgItem $R0 $HWNDPARENT 3 SendMessage $R0 ${WM_SETTEXT} 0 `STR:黑小` ;上一步按键 FunctionEnd
问题:
按钮内容会显示,但在释放文件结束后,又会恢复默认的按钮内容
B:
使用MiscButtonText
MiscButtonText
[上一步文本 [下一步文本] [取消按钮文本] [关闭按钮文本]]
替换这四个 (> 上一步、下一步 <、取消、关闭)。如果留空参数,将使用默认值代替。
接受变量。如果使用了变量,使用的变量必须在 un.onInit 里被初始化。
把MiscButtonText的修改项放到
; 安装过程页面
!insertmacro MUI_PAGE_INSTFILES
前,重新编译,便可得到之前需求的按钮内容。如:MiscButtonText "" "" "" "完成(&G)"