I have the following query -
@ECHO OFF REG QUERY \"HKEY_CURRENT_USER\\Software\\Microsoft\\Microsoft Games\\Flight Simulator\\10.0\" /v AppPath PAUSE
Bellow command does work, For example I want to get OS name :
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName ^| findstr "REG_"') do @echo %%b
The output is :
Windows 10 Enterprise