Search notes:

regQuery.bat

regQuery.bat allows to query the value under a specific registry key in cmd.exe.
The following invocation queries the registry value OS under the queried key:
C:\> "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" OS
Windows_NT

regQuery.bat

@rem
@rem Usage:
@rem
@rem   regQuery  HKCU\Environment PATH
@rem   regQuery "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" TEMP
@rem

@set key=%1
@set val=%2

@if [%key%] equ [] goto usage
@if [%val%] equ [] goto usage

@rem
@rem Use skip=2 because reg query prints an empty line first.
@rem Use tokens=2,* because req query also prints value name and its data type which
@rem we don't want to be printed.
@rem

@for /f "skip=2 tokens=2,*" %%a in ('reg query %key% /v %val%') do @echo %%b

@exit /b 0

:usage
@echo.
@echo.   reqQuery registryKey ValueUnderThisKey
@echo.
Github repository scripts-and-utilities, path: /regQuery.bat

See also

regat.bat can be used in cmd.exe to open the registry (regedit.exe) at a given key.
reg.exe.
Other scripts.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1738291588, '3.142.250.109', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/tools/scripts/personal/regQuery_bat(80): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78