例子:在欢迎页面增加版权信息
优质
小牛编辑
129浏览
2023-12-01
引用脚本的内容:
/*在欢迎页面增加版权信息 By:Ansifa */ SetCompressor /SOLID lzma XPStyle on Name "在欢迎页面增加版权信息" OutFile "在欢迎页面增加版权信息.exe" !include "MUI.nsh" !define MUI_PAGE_CUSTOMFUNCTION_PRE WelcomePageSetupLinkPre !define MUI_PAGE_CUSTOMFUNCTION_SHOW WelcomePageSetupLinkShow !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH !insertmacro MUI_LANGUAGE "SimpChinese" Section SectionEnd Function WelcomePageSetupLinkPre ;读入现在控件数目,然后增加一个控件 !insertmacro MUI_INSTALLOPTIONS_READ $0 "ioSpecial.ini" "Settings" "Numfields" IntOp $0 $0 + 1 ;添加几个控件加几 !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "$0" !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Text" "请仔细阅读下面内容:" !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "60" ;修小原有的文字框,避免遮盖 !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Type" "Text" !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" " 重要须知:\r\n2009.12.12\r\nAnsifa\r\n\r\n腾讯在此特别提醒用户认真阅读、充分理解本《软件许可及服务协议》(下称《协议》)--- 用户应认真阅读、充分理解本《协议》中各条款,特别涉及免除或者限制腾讯责任的免责条款,对用户的权利限制的条款,约定争议解决方式、司法管辖、法律适用的条款。请您审慎阅读并选择接受或不接受本《协议》(未成年人应在法定监护人陪同下阅读)。除非您接受本《协议》所有条款,否则您无权下载、安装或使用本软件及其相关服务。您的下载、安装、使用、帐号获取和登录等行为将视为对本《协议》的接受,并同意接受本《协议》各项条款的约束。" !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Flags" "NOTABSTOP|MULTILINE|VSCROLL|WANTRETURN|READONLY" !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "120" !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "315" !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "65" !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "160" FunctionEnd Function WelcomePageSetupLinkShow ;设置新建控件的颜色和背景色。 Push $0 GetDlgItem $0 $MUI_HWND 1203 SetCtlColors $0 "0000FF" "FFFFFF" CreateFont $1 "$(^Font)" "$(^FontSize)" "400" SendMessage $0 ${WM_SETFONT} $1 1 Pop $0 FunctionEnd