Set Pkey=&Set Skey=&for /f "delims=" %%i in ('reg query "HKCR\Local Settings\MrtCache" /s /d /f "BMP 图像" 2^>nul') do if not defined Pkey (Set "Pkey=%%i") else if not defined Skey for /f "tokens=1,2,* delims=}" %%j in ('echo %%i') do Set "Skey=%%j}"
if defined PKey if defined Skey echo 找到注册表项!& reg add "%Pkey%" /f /v "%Skey:~4%" /d ""&Pause&Exit