Added the HKCR32, HKCR64, HKCU32, HKCU64, HKLM32 and HKLM64 root keys and the experimental HK*ANY root keys.

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6871 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2017-06-06 19:51:43 +00:00
parent bcef20b32d
commit 94dd438510
9 changed files with 125 additions and 46 deletions

View file

@ -8,9 +8,11 @@ Released on ? ?th, 2017
\S2{} Major Changes
\b Fixed RegTool Win9x bug
\b Fixed NSIS3 RegTool Win9x bug
\b Unsupported SetRegView mode fails all registry operations
\b Added the HKCR32, HKCR64, HKCU32, HKCU64, HKLM32 and HKLM64 root keys
\b Unsupported SetRegView mode now fails all registry operations
\b Added \R{execshellwait}{ExecShellWait}

View file

@ -182,6 +182,12 @@ Write a string to the registry. \e{root_key} must be one of:
\b \e{SHCTX} or \e{SHELL_CONTEXT}
\b \e{HKCR32} or \e{HKCR64}
\b \e{HKCU32} or \e{HKCU64}
\b \e{HKLM32} or \e{HKLM64}
If \e{root_key} is \e{SHCTX} or \e{SHELL_CONTEXT}, it will be replaced with \e{HKLM} if \R{setshellvarcontext}{SetShellVarContext} is set to \e{all} and with \e{HKCU} if \R{setshellvarcontext}{SetShellVarContext} is set to \e{current}.
The error flag is set if the string could not be written to the registry. The type of the string will be REG_SZ for \R{writeregstr}{WriteRegStr}, or REG_EXPAND_STR for \R{writeregexpandstr}{WriteRegExpandStr}. If the registry key doesn't exist it will be created.
@ -200,7 +206,7 @@ Writes a multi-string value. The /REGEDIT5 switch must be used and specifies tha
\c 32|64|\\<b\\>default\\</b\\>|lastused
Sets the registry view affected by \R{registry}{registry commands}. On 64-bit versions of Windows there are two views; one for 32-bit applications and one for 64-bit applications. By default, 32-bit applications running on 64-bit systems (WOW64) only have access to the 32-bit view. Using \c{SetRegView 64} allows the installer to access keys in the 64-bit view of the registry.
Sets the registry view affected by \R{registry}{registry commands} (root keys with a 32/64 suffix are not affected). On 64-bit versions of Windows there are two views; one for 32-bit applications and one for 64-bit applications. By default, 32-bit applications running on 64-bit systems (WOW64) only have access to the 32-bit view. Using \c{SetRegView 64} allows the installer to access keys in the 64-bit view of the registry. Registry operations will fail if the selected view is not supported by Windows.
Affects \R{deleteregkey}{DeleteRegKey}, \R{deleteregvalue}{DeleteRegValue}, \R{enumregkey}{EnumRegKey}, \R{enumregvalue}{EnumRegValue}, \R{readregdword}{ReadRegDWORD}, \R{readregstr}{ReadRegStr}, \R{writeregbin}{WriteRegBin}, \R{writeregdword}{WriteRegDWORD}, \R{writeregstr}{WriteRegStr} and \R{writeregexpandstr}{WriteRegExpandStr}.
@ -209,12 +215,17 @@ Does not affect \R{ainstalldirregkey}{InstallDirRegKey}. Instead, the registry m
\c SetRegView 32
\c ReadRegStr $0 HKLM Software\Microsoft\Windows\CurrentVersion ProgramFilesDir
\c DetailPrint $0 # prints C:\Program Files (x86)
\c SetRegView 64
\c ReadRegStr $0 HKLM Software\Microsoft\Windows\CurrentVersion ProgramFilesDir
\c DetailPrint $0 # prints C:\Program Files
\c !include x64.nsh
\c ${If} ${RunningX64}
\c SetRegView 64
\c ReadRegStr $0 HKLM Software\Microsoft\Windows\CurrentVersion ProgramFilesDir
\c DetailPrint $0 # prints C:\Program Files
\c ${EndIf}
\c Function .onInit
\c SetRegView 64
\c ReadRegStr $INSTDIR HKLM Software\NSIS ""
\c SetRegView 32
\c ${If} ${RunningX64}
\c SetRegView 64
\c ReadRegStr $INSTDIR HKLM Software\NSIS ""
\c SetRegView Default
\c ${EndIf}
\c FunctionEnd