@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: Start CANcrypt, here group 2,3,7
if -%3-==-- echo Use CcGoAll SerialPort_Device_2 SerialPort_Device_3 SerialPort_Device_7
if -%3-==-- goto:eof
echo COIA Activate CANcrypt, ignore sec list, device ID 2, 3 and 7
"%TOOL_PATH%\COIA.exe" -p %1 -w 0x5EF0,5,2,0x0006 -w 0x5EF0,6,2,0x0082 -w 0x5EF0,3,1,0x20 -w 0x5eF0,2,1,2
"%TOOL_PATH%\COIA.exe" -p %2 -w 0x5EF0,5,2,0x0006 -w 0x5EF0,6,2,0x0082 -w 0x5EF0,3,1,0x20 -w 0x5eF0,2,1,3
"%TOOL_PATH%\COIA.exe" -p %3 -w 0x5EF0,5,2,0x0006 -w 0x5EF0,6,2,0x0082 -w 0x5EF0,3,1,0x20 -w 0x5eF0,2,1,7
echo COIA batch CcGoAll: end
