使用SectionSetText隐藏不想显示的区段

Name "隐藏区段"
Caption "$(^Name)"
OutFile "隐藏区段.exe"
XPStyle on
!include "MUI2.nsh"

RequestExecutionLevel admin
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "SimpChinese"

Section /o "心锁" test_section_1
 MessageBox MB_OK "1"
SectionEnd

Section /o "永恒" test_section_2
 MessageBox MB_OK "2"
SectionEnd

Function .onInit
 SectionSetFlags ${test_section_1} 1 ;勾选“心锁”区段
 SectionSetText ${test_section_2} "" ;隐藏“永恒”区段
FunctionEnd
© 版权声明
THE END
喜欢就支持一下吧
点赞5 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容