echo off
CD /D %~dp0

del /Q /F %SystemRoot%\system32\drivers\ar6006*.*
del /Q /F %SystemRoot%\system32\drivers\boardData_AR6006.bin

echo Update the driver
..\..\..\..\bin\devcon_amd64.exe update ar6006_sp242.inf "USB\Vid_0cf3&Pid_9372&Rev_0100" 

echo Disable the driver
..\..\..\..\bin\devcon_amd64.exe disable "USB\Vid_0cf3&Pid_9372&Rev_0100"

echo Force to update this verison of driver
copy /Y *.sys %SystemRoot%\system32\drivers

echo Force to update ar6006 utf/otp/board data.
copy /Y ..\..\..\Firmware\AR6006\ar6006*.bin %SystemRoot%\system32\drivers
copy /Y ..\..\..\boardData\boardData_2_1_SP242.bin %SystemRoot%\system32\drivers\boardData_AR6006.bin

echo Enable the driver
..\..\..\..\bin\devcon_amd64.exe enable "USB\Vid_0cf3&Pid_9372&Rev_0100" 
pause