!include "FileFunc.nsh" !include "MUI.nsh" Outfile test.exe !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_INSTFILES !define MUI_PAGE_CUSTOMFUNCTION_SHOW pagefinishshow !define MUI_FINISHPAGE_RUN "notepad.exe" !insertmacro MUI_PAGE_FINISH Section "secDummy" ; ... SectionEnd !insertmacro MUI_LANGUAGE "English" Function pagefinishshow ${GetParameters} $R0 ${If} $R0 == "/norun" GetDlgItem $MUI_TEMP1 $MUI_HWND 1203 ;可用 spy++ detect 该窗口 ID SendMessage $MUI_TEMP1 ${BM_SETCHECK} 0 0 ShowWindow $MUI_TEMP1 ${SW_HIDE} ${EndIf} FunctionEnd运行效果:
D:\>test
D:\>test /norun
没有评论 :
发表评论