python 3.9及以上 对于win7没有适配(不能安装) 同时由于 #PyQt5<5.14 #QT5.14之后的版本有串口收发的兼容性问题。故:python 不能升级到python3.10。
20 lines
641 B
Batchfile
20 lines
641 B
Batchfile
::echo off
|
|
|
|
@echo off
|
|
setlocal
|
|
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
|
|
|
|
if "%version%" == "6.1" (
|
|
if exist "%windir%\sysnative\pnputil.exe" (
|
|
start "STM32 USB DFU DRIVER" %windir%\sysnative\pnputil.exe -i -a %0\..\DriverNotSigned\DFU_in_HS_Mode.inf
|
|
) else (
|
|
start "STM32 USB DFU DRIVER" pnputil -i -a %0\..\DriverNotSigned\DFU_in_HS_Mode.inf
|
|
)
|
|
) else (
|
|
if exist "%windir%\sysnative\pnputil.exe" (
|
|
start "STM32 USB DFU DRIVER" %windir%\sysnative\pnputil.exe -i -a %0\..\Driver\STM32Bootloader.inf
|
|
) else (
|
|
start "STM32 USB DFU DRIVER" pnputil -i -a %0\..\Driver\STM32Bootloader.inf
|
|
)
|
|
)
|
|
endlocal |