在结束页面添加运行程序选项
优质
小牛编辑
133浏览
2023-12-01
方法一:
;------------------------------------------------------ !define MUI_FINISHPAGE_RUN "$windir\notepad.exe" !define MUI_FINISHPAGE_RUN_PARAMETERS "e:\汉化说明.txt" !define MUI_FINISHPAGE_RUN_TEXT "查看汉化说明" !insertmacro MUI_PAGE_FINISH ;------------------------------------------------------
方法二:
;------------------------------------------------------ !define MUI_FINISHPAGE_RUN !define MUI_FINISHPAGE_RUN_FUNCTION Note !define MUI_FINISHPAGE_RUN_TEXT "查看汉化说明然后运行程序" !insertmacro MUI_PAGE_FINISH Function Note execwait '$windir\notepad.exe "e:\汉化说明.txt"' exec "$sysdir\mspaint.exe" Functionend ;------------------------------------------------------
方法一简单方便,方法二借助函数可以运行多个程序并能完成其他事情,比较灵活自由。
另外,如果仅仅是为了打开一个txt文本,下面的最简单(无需先运行 notepad.exe ):
!define MUI_FINISHPAGE_SHOWREADME "e:\使用说明.txt" !define MUI_FINISHPAGE_SHOWREADME_TEXT "使用说明" !insertmacro MUI_PAGE_FINISH