@echo off
cd /d %~dp0

echo ============================================================   
echo 获取工具路径...
:ADMIN
if /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto AMD64
if /I "%PROCESSOR_ARCHITEW6432%"=="AMD64" goto AMD64
rem ============================================   
         FOR /F "tokens=2*" %%A IN ('reg query HKEY_LOCAL_MACHINE\SOFTWARE\ChipON\ChipONCC32  /v Path ') DO (set  pInstallDir=%%B)
         PATH=%pInstallDir%\common;%pInstallDir%\ccr1_issue\bin;%pInstallDir%\kf32\bin;%PATH%
rem ============================================
goto END
:AMD64
rem ============================================
         FOR /F "tokens=2*" %%A IN ('reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ChipON\ChipONCC32  /v Path ') DO (set  pInstallDir=%%B)
         PATH=%pInstallDir%\common;%pInstallDir%\ccr1_issue\bin;%pInstallDir%\kf32\bin;%PATH%
rem ###########################################################################################
:END

pskill -t -nobanner kf32-gdb


pause