首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当某些东西返回一个特定值时,我如何取消隐藏一个节?

当某些东西返回一个特定值时,我如何取消隐藏一个节?
EN

Stack Overflow用户
提问于 2012-09-10 17:49:14
回答 1查看 805关注 0票数 0

我有一个使用HM编辑创建的安装程序。如果我的检查发现它未安装,我希望能够取消隐藏名为VDF的部分。并在安装时将其隐藏,并且不执行该嵌入式安装程序。

我希望我说得很清楚了。

这是函数:

代码语言:javascript
复制
Function .onInit #Check's wether the installer is in your installation folder. onInit means that it checks for that even before the installer is initialized.
  ${If} ${FileExists} "$EXEDIR\VDF2012-17.0.22.8.Client.exe"
    MessageBox MB_OK "VDF found"

  ${Else}
    MessageBox MB_OK "The Visual DataFlex setup was not found in the installation folder. However the installation of $(^Name) will still continue."

  ${EndIf}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-09-10 18:13:46

要隐藏节,您必须将change its name转换为空字符串。

要选中/取消选中某个部分,应使用sections.nsh中的帮助器宏。

代码语言:javascript
复制
!include sections.nsh

Section "VDF" SID_VDF
#Install VDF
SectionEnd

Function .onInit
${IfNot} ${FileExists} "$EXEDIR\VDF2012-17.0.22.8.Client.exe"
  !insertmacro UnselectSection ${SID_VDF}
  SectionSetText ${SID_VDF} ""
${EndIf}
FunctionEnd

要取消隐藏,您可以给它一个非空的名称,但在默认情况下显示它,并在需要时隐藏它,通常工作较少……

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12349173

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档