@echo off

set DEVCON_PATH=devcon\x86\devcon.exe
if defined ProgramFiles(x86) (
	set DEVCON_PATH=devcon\x64\devcon.exe
)

echo ************************
echo   USB Driver Installer
echo ************************
echo DEVCON_PATH= "%DEVCON_PATH%"

%DEVCON_PATH% dp_add ASUS_USB\Windows_XP_VISTA_7_8_8.1\Android\android_winusb.inf
IF %ERRORLEVEL% NEQ 0 goto fail
%DEVCON_PATH% dp_add QCOM_USB\adb\android_winusb.inf
IF %ERRORLEVEL% NEQ 0 goto fail
%DEVCON_PATH% dp_add ASUS_USB\Windows_XP_VISTA_7_8_8.1\Android\intc_adb.inf
IF %ERRORLEVEL% NEQ 0 goto fail
:goto success

:fail
exit 1

:success
exit 0
