pushd %~dp0

:chkhwid-AX201
DeviceCheck.exe /All /HWID /D /S:"PCI\VEN_8086&DEV_51F0&SUBSYS_00748086"
if %errorlevel% == 0 goto :ins-AX201
if not %errorlevel% == 0 goto :chkhwid-AX211

:chkhwid-AX211
DeviceCheck.exe /All /HWID /D /S:"PCI\VEN_8086&DEV_51F0&SUBSYS_00948086"
if %errorlevel% == 0 goto :ins-AX211
if not %errorlevel% == 0 goto :chkhwid-7921

:chkhwid-7921
DeviceCheck.exe /All /HWID /D /S:"PCI\VEN_14C3&DEV_7961"
if %errorlevel% == 0 goto :ins-7921
if not %errorlevel% == 0 goto :chkhwid-Realtek-8852BE

:chkhwid-Realtek-8852BE
DeviceCheck.exe /All /HWID /D /S:"PCI\VEN_10EC&DEV_B852&SUBSYS_C8261D3E"
if %errorlevel% == 0 goto :ins-Realtek
if not %errorlevel% == 0 goto :end

:ins-AX201
pnputil -i -a "%~dp0Drivers\Netwtw08.INF"
pnputil -i -a "%~dp0Utilities\PIE\PieExtension.INF"
pnputil -i -a "%~dp0Utilities\PIE\PieComponent.INF"
goto :end

:ins-AX211
pnputil -i -a "%~dp0Drivers\Netwtw6e.INF"
pnputil -i -a "%~dp0Utilities\PIE\PieExtension.INF"
pnputil -i -a "%~dp0Utilities\PIE\PieComponent.INF"
goto :end


:ins-7921
pnputil -i -a "%~dp0MTK\mtkwl6ex.inf"
goto :end

:ins-Realtek
pnputil -i -a "%~dp0Realtek\netrtwlane601.inf"
goto :end

:end
cd %~dp0
call ICPS_1.1021.1221.1\install.bat
timeout 03
echo done

exit

