1e924cfadSCristian Maglie@echo off
20cbc68f1SCristian Maglieset ARGS=/SE /SW /SA
3e924cfadSCristian Maglieif "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
4e924cfadSCristian Maglie  drivers\dpinst-amd64.exe %ARGS%
5e924cfadSCristian Maglie) ELSE IF "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
6e924cfadSCristian Maglie  drivers\dpinst-amd64.exe %ARGS%
7e924cfadSCristian Maglie) ELSE (
8e924cfadSCristian Maglie  drivers\dpinst-x86.exe %ARGS%
9e924cfadSCristian Maglie)
109f9d2c7bSDan Halbert
119f9d2c7bSDan Halbert@echo off
129f9d2c7bSDan Halbertsetlocal
139f9d2c7bSDan Halbertfor /f "tokens=4-5 delims=[.] " %%i in ('ver') do @(if %%i==Version (set VERSION=%%j) else (set VERSION=%%i))
149f9d2c7bSDan Halbertif %VERSION% GEQ 10 (
159f9d2c7bSDan Halbert  exit /b 0
169f9d2c7bSDan Halbert)
179f9d2c7bSDan Halbertendlocal
189f9d2c7bSDan Halbert
199f9d2c7bSDan HalbertREM dpinst /PATH has problems with relative paths, so use absolute path.
209f9d2c7bSDan Halbertif "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
219f9d2c7bSDan Halbert  drivers\dpinst-amd64.exe /PATH %cd%\drivers\prewin10 %ARGS%
229f9d2c7bSDan Halbert) ELSE IF "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
239f9d2c7bSDan Halbert  drivers\dpinst-amd64.exe /PATH %cd%\drivers\prewin10 %ARGS%
249f9d2c7bSDan Halbert) ELSE (
25163ef56bSMartino Facchin  drivers\dpinst-x86.exe /PATH %cd%\drivers\prewin10 %ARGS%
269f9d2c7bSDan Halbert)
279f9d2c7bSDan Halbert
28e924cfadSCristian Maglieexit /b 0
29