I have the following query -
@ECHO OFF
REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Flight Simulator\10.0" /v AppPath
PAUSE
This returns the Name, Type, and Data of the entry, as below -
HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Flight Simulator\10.0
AppPath REG_SZ C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\
Press any key to continue . . .
Is it possible to retrieve only the Data section of a registry entry?
for /f "tokens=2*" %%a in ('REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Flight Simulator\10.0" /v AppPath') do set "AppPath=%%~b"
echo %AppPath%
pause
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With