STM32Bootloader.bat 641 B

1234567891011121314151617181920
  1. ::echo off
  2. @echo off
  3. setlocal
  4. for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
  5. if "%version%" == "6.1" (
  6. if exist "%windir%\sysnative\pnputil.exe" (
  7. start "STM32 USB DFU DRIVER" %windir%\sysnative\pnputil.exe -i -a %0\..\DriverNotSigned\DFU_in_HS_Mode.inf
  8. ) else (
  9. start "STM32 USB DFU DRIVER" pnputil -i -a %0\..\DriverNotSigned\DFU_in_HS_Mode.inf
  10. )
  11. ) else (
  12. if exist "%windir%\sysnative\pnputil.exe" (
  13. start "STM32 USB DFU DRIVER" %windir%\sysnative\pnputil.exe -i -a %0\..\Driver\STM32Bootloader.inf
  14. ) else (
  15. start "STM32 USB DFU DRIVER" pnputil -i -a %0\..\Driver\STM32Bootloader.inf
  16. )
  17. )
  18. endlocal