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:
parent
8560a7e2cf
commit
2fa5cd37b8
4 changed files with 29 additions and 2 deletions
|
@ -85,7 +85,7 @@ This is similar to \R{getfiletime}{GetFileTime}, only it acts on the system buil
|
||||||
|
|
||||||
\c user_var(output) knownfolderid
|
\c user_var(output) knownfolderid
|
||||||
|
|
||||||
Get the path of a \W{https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid}{known folder}. The error flag is set and the output variable is empty if the call fails or the knownfolderid guid is not available. This function is only able to resolve known folders Windows Vista or higher.
|
Get the path of a \W{https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid}{known folder}. The error flag is set and the output variable is empty if the call fails or the knownfolderid guid is not available. This function is only able to resolve known folders on Windows Vista or higher.
|
||||||
|
|
||||||
\c !include WinCore.nsh
|
\c !include WinCore.nsh
|
||||||
\c !include LogicLib.nsh
|
\c !include LogicLib.nsh
|
||||||
|
|
|
@ -6,7 +6,7 @@ Released on ? ?th, 2020
|
||||||
|
|
||||||
\S1{v3.06-rl} Release Notes
|
\S1{v3.06-rl} Release Notes
|
||||||
|
|
||||||
?
|
20th anniversary
|
||||||
|
|
||||||
\S1{v3.06-cl} Changelog
|
\S1{v3.06-cl} Changelog
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,8 @@
|
||||||
; ${SectionIsSectionGroupEnd} a; ${SectionIsBold} a;
|
; ${SectionIsSectionGroupEnd} a; ${SectionIsBold} a;
|
||||||
; ${SectionIsReadOnly} a; ${SectionIsExpanded} a;
|
; ${SectionIsReadOnly} a; ${SectionIsExpanded} a;
|
||||||
; ${SectionIsPartiallySelected} a
|
; ${SectionIsPartiallySelected} a
|
||||||
|
; Additional tests:
|
||||||
|
; HK RegKeyIsEmpty SubKey
|
||||||
;
|
;
|
||||||
; Examples:
|
; Examples:
|
||||||
; See LogicLib.nsi in the Examples folder for lots of example usage.
|
; See LogicLib.nsi in the Examples folder for lots of example usage.
|
||||||
|
@ -351,6 +353,22 @@
|
||||||
!macroend
|
!macroend
|
||||||
!define AltRegView `"" AltRegView ""`
|
!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
|
; "Any instruction" test
|
||||||
!macro _Cmd _a _b _t _f
|
!macro _Cmd _a _b _t _f
|
||||||
!define _t=${_t}
|
!define _t=${_t}
|
||||||
|
|
|
@ -23,6 +23,15 @@
|
||||||
; Abort "Unsupported CPU architecture!"
|
; Abort "Unsupported CPU architecture!"
|
||||||
; ${EndIf}
|
; ${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.
|
; DisableX64FSRedirection disables file system redirection.
|
||||||
; EnableX64FSRedirection enables file system redirection.
|
; EnableX64FSRedirection enables file system redirection.
|
||||||
;
|
;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue