@echo off

:start
if exist computer.txt del computer.txt
usbpcipnp.exe
if not exist computer.txt goto start
if exist error.txt del error.txt
strcmp /f:computer.txt /c:"ID = ACPI\IFX0102" 
if exist error.txt goto fail
goto pass

:fail
color 0C
echo.
echo  *********************************************************************
echo  ***********              TPM device check                 ***********
echo  *********************************************************************
echo.
echo.
echo    FFFFFFFFFFFF           FF            FFFFFF         FF 
echo    FF                   FF  FF            FF           FF          
echo    FF                 FF      FF          FF           FF          
echo    FF                FF        FF         FF           FF          
echo    FF               FF          FF        FF           FF       
echo    FF               FF          FF        FF           FF            
echo    FFFFFFFFFFFF     FF          FF        FF           FF
echo    FF               FFFFFFFFFFFFFF        FF           FF              
echo    FF               FF          FF        FF           FF              
echo    FF               FF          FF        FF           FF       
echo    FF               FF          FF        FF           FF          
echo    FF               FF          FF      FFFFFF         FFFFFFFFFFFF  
echo.
echo  *********************************************************************
echo  ***********              TPM device check                 ***********
echo  *********************************************************************
echo.
echo FAIL > TPMCHK.log
goto end

:PASS
color 02
echo.
echo.
echo  *********************************************************************
echo  ***********              TPM device check                 ***********
echo  *********************************************************************
echo.
echo.
echo    PPPPPPPPPPPP           PP           PPPPPPPPPP        PPPPPPPPPP  
echo    PP          PP       PP  PP       PP          PP    PP          PP
echo    PP          PP     PP      PP     PP          PP    PP          PP  
echo    PP          PP    PP        PP    PP                PP          
echo    PP          PP   PP          PP   PP                PP       
echo    PP          PP   PP          PP   PP                PP            
echo    PPPPPPPPPPPP     PP          PP     PPPPPPPPPP        PPPPPPPPPP  
echo    PP               PPPPPPPPPPPPPP               PP                PP
echo    PP               PP          PP               PP                PP
echo    PP               PP          PP   PP          PP    PP          PP
echo    PP               PP          PP   PP          PP    PP          PP
echo    PP               PP          PP     PPPPPPPPPP        PPPPPPPPPP  
echo.
echo  *********************************************************************
echo  ***********              TPM device check                 ***********
echo  *********************************************************************
echo.
echo PASS > TPMCHK.log
color 0f

:end