do not install CPX drivers on win10

This commit is contained in:
Dan Halbert 2018-08-03 22:02:15 -04:00 committed by Cristian Maglie
parent 09f867e86d
commit 9f9d2c7b7e
3 changed files with 18 additions and 0 deletions

View file

@ -7,4 +7,22 @@ if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
) ELSE (
drivers\dpinst-x86.exe %ARGS%
)
@echo off
setlocal
for /f "tokens=4-5 delims=[.] " %%i in ('ver') do @(if %%i==Version (set VERSION=%%j) else (set VERSION=%%i))
if %VERSION% GEQ 10 (
exit /b 0
)
endlocal
REM dpinst /PATH has problems with relative paths, so use absolute path.
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
drivers\dpinst-amd64.exe /PATH %cd%\drivers\prewin10 %ARGS%
) ELSE IF "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
drivers\dpinst-amd64.exe /PATH %cd%\drivers\prewin10 %ARGS%
) ELSE (
drivers/dpinst-x86.exe /PATH %cd%\drivers\prewin10 %ARGS%
)
exit /b 0