@set L=C:\Windows\temp\Driver_install.log
@set L2=C:\Windows\temp\Driver_install_chipsets.log
@set IP=[********Install Pass********]
@set IPR=[********Install Pass, Restart is need********]
@set IF=[********Install Fail********]

@echo. >> %L2%
@echo [%time%]=========Install Intel SMBus driver========= >> %L%
@echo [%time%]=========Install Intel SMBus driver========= >> %L2%

pnputil /add-driver "%~dp0Drivers\*.inf" /install >> %L%
@if %errorlevel%==0 (echo [%time%]%IP% >> %L% & echo [%time%]%IP% >> %L2% & goto resultpass)
@if %errorlevel%==259 (echo [%time%]%errorlevel% >> %L% & goto resultpass)
@if %errorlevel%==3010 (echo [%time%]%IPR% >> %L% & echo [%time%]%IPR% >> %L2% & goto resultpass)
@if not %errorlevel%==0 goto ERR

:resultpass
@echo [%time%]=========Intel SMBus driver Install Complete========= >> %L%
@echo [%time%]=========Intel SMBus driver Install Complete========= >> %L2%
@echo. >> %L2%
ECHO ERRRORLEVEL=%ERRORLEVEL% >> %L%
@set LL=C:\Windows\temp\SMBus.log
@echo [%time%] >>%LL%
EXIT /B 0

:ERR
echo [%time%]%IF% >> %L%
echo [%time%]%IF% >> %L2%
ECHO ERRRORLEVEL=%ERRORLEVEL% >> %L%
ECHO ERRRORLEVEL=%ERRORLEVEL% >> %L2%
@echo. >> %L2%
EXIT /B 1