I need to run this script I made. This batch should copy compiled program on STM32 Nucleo. It uses
wmic to find Nucleo's virtual drive's letter by it's label:
@echo off for /f %%D in ('wmic volume get DriveLetter^, Label ^| find "NODE_F446RE"') do set nucleo_drive=%%D IF EXIST %D%\DETAILS.TXT ( IF EXIST main.bin ( @echo on xcopy main.bin %D% @echo off echo Copied main.bin on nucleo ) ELSE ( echo Binary not found. Run `mingw32-make` in this directory to compile the project. ) ) ELSE ( echo Nucleo drive not found. If needed, edit the `find "NODE_F446RE"` part of this script to refference your nucleo volume name. )
But I get this error:
'wmic' is not recognized as an internal or external command, operable program or batch file.
I ensured that Windows Management Instrumenation service is running. What else could be wrong?