杉宫竹苑工作室

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1984|回复: 0

NSIS 自动显示组件

[复制链接]
发表于 2017-2-26 13:41:13 | 显示全部楼层 |阅读模式

正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!

您需要 登录 才可以下载或查看,没有账号?立即注册

x
  1. !include "UsefulLib.nsh"
  2. Name TestSelectSection
  3. OutFile "TestSelectSection.exe"

  4. Page components
  5. Page instfiles
  6. ShowInstDetails show

  7. Section "01" SEC01
  8. SectionEnd

  9. Section "02" SEC02
  10. SectionEnd

  11. Section "03" SEC03
  12. SectionEnd

  13. Section "04" SEC04
  14. SectionEnd



  15. Function .onInit
  16. ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KB920213" "NoModify"
  17. ${if} $0 == 1  ;数值等于1,不显示SEC01组件
  18.   !insertmacro SetSectionFlag ${Sec01} ${SF_RO}
  19.   !insertmacro UnselectSection ${Sec01}
  20.   SectionSetText ${Sec01} ""
  21. ${endif}
  22. FunctionEnd
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SgzyStudio

GMT+8, 2024-5-19 14:21 , Processed in 0.104617 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表