Added RegKeyIsEmpty LogicLib operator

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7165 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2020-04-06 18:04:10 +00:00
parent 8560a7e2cf
commit 2fa5cd37b8
4 changed files with 29 additions and 2 deletions

View file

@ -68,6 +68,8 @@
; ${SectionIsSectionGroupEnd} a; ${SectionIsBold} a;
; ${SectionIsReadOnly} a; ${SectionIsExpanded} a;
; ${SectionIsPartiallySelected} a
; Additional tests:
; HK RegKeyIsEmpty SubKey
;
; Examples:
; See LogicLib.nsi in the Examples folder for lots of example usage.
@ -351,6 +353,22 @@
!macroend
!define AltRegView `"" AltRegView ""`
!macro _RegKeyIsEmpty _a _b _t _f
!insertmacro _LOGICLIB_TEMP
ClearErrors
EnumRegValue $_LOGICLIB_TEMP ${_a} `${_b}` ""
!if `${_f}` != ``
IfErrors "" `${_f}` ; Skip calls to EnumRegKey and _== if possible
!else
IfErrors +3
StrCpy $_LOGICLIB_TEMP "1" ; The default value is also named "", make sure we don't mistake it as empty
Goto +2
!endif
EnumRegKey $_LOGICLIB_TEMP ${_a} `${_b}` ""
!insertmacro _== $_LOGICLIB_TEMP "" `${_t}` `${_f}`
!macroend
!define RegKeyIsEmpty `RegKeyIsEmpty`
; "Any instruction" test
!macro _Cmd _a _b _t _f
!define _t=${_t}

View file

@ -23,6 +23,15 @@
; Abort "Unsupported CPU architecture!"
; ${EndIf}
;
; ${If} ${IsNativeAMD64}
; File "amd64\myapp.exe"
; ${ElseIf} ${IsNativeIA32}
; ${OrIf} ${IsWow64}
; File "x86\myapp.exe"
; ${Else}
; Abort "Unsupported CPU architecture!"
; ${EndIf}
;
; DisableX64FSRedirection disables file system redirection.
; EnableX64FSRedirection enables file system redirection.
;