@echo off

SET HWID= "PCI\VEN_10EC&DEV_8131" "PCI\VEN_10EC&DEV_8136" "PCI\VEN_10EC&DEV_8137" "PCI\VEN_10EC&DEV_8168" "PCI\VEN_10EC&DEV_8161" "PCI\VEN_10EC&DEV_8169" "PCI\VEN_10EC&DEV_8167" "PCI\VEN_10EC&DEV_8125" "PCI\VEN_10EC&DEV_2502" "PCI\VEN_10EC&DEV_2600" "PCI\VEN_10EC&DEV_3000" "PCI\VEN_10EC&DEV_8162"

net stop DashClientService
IF %ERRORLEVEL% EQU 0 goto Dash
goto Normal

:Dash
devcon32.exe disable %HWID%
RTNicPgW32.exe /efuse %1 %2 %3 %4
IF %ERRORLEVEL% EQU 1 goto Fail
devcon32.exe rescan
devcon32.exe enable %HWID%
net start DashClientService
goto end

:Normal
echo Normal
devcon32.exe disable %HWID%
RTNicPgW32.exe /efuse %1 %2 %3 %4
IF %ERRORLEVEL% EQU 1 goto Fail
devcon32.exe rescan
devcon32.exe enable %HWID%
goto end

:Fail
pause
goto Fail

:end
