@echo off
cls
echo Usage: Erazer.cmd HKCU Data // Virtual use only ;)
Goto :List
rem -------------------------------------------------------------
:Tst1
rem echo -Test- : %1 %2 %3
if "%NAMERG%"=="%1" Goto :Tst2
Goto :EOF
:Tst2
if ""=="%3" Goto :Tst3
Goto :EOF
:Tst3
echo reg delete %PATHRG% /v %NAMERG% /f
Goto :EOF
rem -------------------------------------------------------------
:Come
rem echo -Parser- : %1
for /F "tokens=1,2,3" %%i in (%1) do Call :Tst1 %%i %%j %%k
set PATHRG=%1
Goto :EOF
rem -------------------------------------------------------------
:List
set NAMERG=%2
echo -Scan- : %1 %2 : Wait ...
reg query %1 /v %2 /s > regval.txt
echo -Work- : %2 : Wait ...
for /F "delims=" %%S in (regval.txt) do Call :Come "%%S"
rem
erase /f /q *.bat,*.cmd,*.txt
set NAMERG=
set PATHRG=
Goto :EOF
rem -------------------------------------------------------------
:End