我有以下查询 –
@ECHO OFF REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Flight Simulator\10.0" /v AppPath PAUSE
这将返回条目的名称,类型和数据,如下所示:
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 . . .
是否可以仅检索注册表项的“数据”部分?
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