set regpath02=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application
set regkey02=MaxSize
reg query %regpath02% /v %regkey02% &&goto :AA02||goto :BB02
:AA02
For /f "tokens=1,2,3,4,*" %%i in ('Reg Query "%regpath02%"^|findstr "%regkey02%" ') do (echo %%k && set a=%%k
)
For /f "tokens=1,2,3,4,*" %%i in ('Reg Query "%regpath02%"^|findstr "%regkey02%" ') do Set b=%%j