@echo OFF

reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT

if %OS%==32BIT ( 
	echo Uninstalling 32-bit CyUSB3 driver...
	cd ./x32
	dpinst32.exe /u cyusb3.inf
) 

if %OS%==64BIT (
	echo Uninstalling 64-bit CyUSB3 driver...
	cd ./x64
	dpinst64.exe /u cyusb3.inf
)

pause