@echo Searching system for %1% 
echo OFF
set filename=%1%
set FD=NOTFOUND
for /D %%I in ("C:\Program Files (x86)\Windows Kits\10\bin\10*") do if exist %%I\x86\%filename% set FD=%%I\x86
if not "%FD%"=="NOTFOUND" goto found
echo file %filename% not found
goto last
:found
echo %path% > path.txt
find /c "%FD%" path.txt > error.txt
if %ERRORLEVEL% == 0 echo %filename% already in path && goto last
echo Found %filename%. Added %FD% to path.

@set path=%path%;%FD%
:last