@@ -99,28 +99,31 @@ if not exist "%SKILL_DIR%lib\edgetpu.dll" (
9999echo %LOG_PREFIX% edgetpu.dll ready in lib\. 1 >& 2
100100echo {" event" : " progress" , " stage" : " platform" , " message" : " Edge TPU DLLs ready." }
101101
102- REM ── Install WinUSB driver via pnputil (bundled INF, no interactive prompts) ──
103- set " TMP_DIR = %TEMP% \coral_drv_%RANDOM% "
104- mkdir " %TMP_DIR% "
105- echo @echo off > " %TMP_DIR% \install_coral_driver.bat"
106- echo pnputil /add-driver " %SKILL_DIR% driver\coral_winusb.inf" /install >> " %TMP_DIR% \install_coral_driver.bat"
107- echo pnputil /scan-devices >> " %TMP_DIR% \install_coral_driver.bat"
108-
109- echo %LOG_PREFIX% Prompting for Administrator rights to install Coral WinUSB driver... 1 >& 2
110- echo {" event" : " progress" , " stage" : " platform" , " message" : " A UAC prompt will appear. Approve it to install the Coral USB hardware driver." }
111-
112- powershell -NoProfile -Command " Start-Process cmd.exe -ArgumentList '/c \" %TMP_DIR% \install_coral_driver.bat\" ' -Verb RunAs -Wait" 2 > nul
102+ REM ── Install UsbDk Driver (bundled MSI, required for Coral TPU on Windows)
103+ if exist " %SKILL_DIR% driver\UsbDk_1.0.22_x64.msi" (
104+ set " TMP_DIR = %TEMP% \coral_drv_%RANDOM% "
105+ mkdir " %TMP_DIR% "
106+ echo @echo off > " %TMP_DIR% \install_coral_driver.bat"
107+ echo msiexec /i " %SKILL_DIR% driver\UsbDk_1.0.22_x64.msi" /qn /norestart >> " %TMP_DIR% \install_coral_driver.bat"
108+
109+ echo %LOG_PREFIX% Prompting for Administrator rights to install Coral UsbDk driver... 1 >& 2
110+ echo {" event" : " progress" , " stage" : " platform" , " message" : " A UAC prompt will appear. Approve it to install the Coral USB driver (UsbDk)." }
111+
112+ powershell -NoProfile -Command " Start-Process cmd.exe -ArgumentList '/c \" %TMP_DIR% \install_coral_driver.bat\" ' -Verb RunAs -Wait" 2 > nul
113+
114+ if %errorlevel% neq 0 (
115+ echo %LOG_PREFIX% UAC declined - hardware TPU driver not installed. CPU fallback available. 1 >& 2
116+ echo {" event" : " progress" , " stage" : " platform" , " message" : " UAC skipped. CPU fallback available. Reinstall and approve UAC to enable hardware TPU." }
117+ ) else (
118+ echo %LOG_PREFIX% Coral UsbDk driver installed. 1 >& 2
119+ echo {" event" : " progress" , " stage" : " platform" , " message" : " Coral UsbDk driver installed. Unplug and replug your Coral USB Accelerator to activate." }
120+ )
113121
114- if %errorlevel% neq 0 (
115- echo %LOG_PREFIX% UAC declined - hardware TPU driver not installed. CPU fallback available. 1 >& 2
116- echo {" event" : " progress" , " stage" : " platform" , " message" : " UAC skipped. CPU fallback available. Reinstall and approve UAC to enable hardware TPU." }
122+ rmdir /S /Q " %TMP_DIR% " 2 > nul
117123) else (
118- echo %LOG_PREFIX% Coral WinUSB driver installed. 1 >& 2
119- echo {" event" : " progress" , " stage" : " platform" , " message" : " Coral WinUSB driver installed. Unplug and replug your Coral USB Accelerator to activate." }
124+ echo %LOG_PREFIX% WARNING: UsbDk MSI not found in driver\. Skipping driver install. 1 >& 2
120125)
121126
122- rmdir /S /Q " %TMP_DIR% " 2 > nul
123-
124127
125128
126129REM ─── Step 2: Find Python ─────────────────────────────────────────────────────
0 commit comments