0

HM NIS Edit を使用して作成されたインストーラーがあります。また、チェックで VDF がインストールされていないことが判明した場合に、VDF というセクションを再表示できるようにしたいと考えています。インストール時に非表示にし、その組み込みインストーラーを実行しないでください。

私は自分自身を明確にしたことを願っています。

これは機能です:

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}
4

1 に答える 1

1

To hide a section you must change its name to a empty string.

To check/uncheck a section you should use the helper macros in sections.nsh.

!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

To unhide you would give it a non-empty name but it is usually less work to show it by default and hide when required...

于 2012-09-10T10:13:46.097 に答える