
pushd "%~dp0"

::Install RTK BT driver

   ::Check RTK BT HWID
   DeviceCheck.exe /All /HWID /D /S:"USB\VID_0CB5&PID_C547"
   if "%errorlevel%" == "0" goto :install_RTK_BT_Driver
    
   ::Check QCA BT HWID
   DeviceCheck.exe /All /HWID /D /S:"USB\VID_04CA&PID_301F"
   if "%errorlevel%" == "0" goto :install_QCA_BT_Driver
   if not "%errorlevel%" == "0" goto :end
 

 :install_RTK_BT_Driver
  pnputil.exe -add-driver "RTK_BT_2.8.1053.3000\Rtkfilter.inf" -install
  goto :end

 :install_QCA_BT_Driver
  pnputil.exe -add-driver "QCA_BT_10.0.0.995\atheros_bth.inf" -install

:end
popd