@echo off
set MY_PATH=%~dp0
if "%MY_PATH%"=="" set MY_PATH=.\
for /f "delims== usebackq tokens=1,2" %%G in ("%MY_PATH%tool-path.txt") do set %%G=%%H
set TOOL_PATH=%MY_PATH%%COIA_PATH%
echo COIA batch: Erase a CANcrypt key (ID from 2 to 6)
if -%2-==-- echo Use CcEraseKey SerialPort KeyID
if -%2-==-- goto:eof
"%TOOL_PATH%\COIA.exe" -p %1 -w 0x5EF2,%2,4,0xFFFFFFFF
echo COIA batch CcEraseKey %1 %2 completed
